🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2409

Re: pascal code to modula

#2409
From: Bill Seurer
Date: Fri, 22 Jan 1993 20:10
28 lines
1264 bytes
In article <8267@kielo.uta.fi>, csfraw@vehka.cs.uta.fi (Francis Akoto) writes:
|> This is a pascal code
|> 
|>    i,j: integer ;
|> 
|> 		  i := i or j ;
|> 
|> what will be ite equivalent in modula-2 ?
|> 

With JPI it would be:

   i, j: INTEGER;

   i := i OR j;

assuming you turn on the "bitwise logical operator" option previously
mentioned here.

In more "standard" Modula-2 this works (I think):

  i := INTEGER(BITSET(i) + BITSET(j));

You might need VALs or CASTs or something in there though.
-- 

- Bill Seurer     Language and Compiler Development      IBM Rochester, MN
  Internet: BillSeurer@vnet.ibm.com    America On-Line: BillSeurer@aol.com
Technical Details
Message-ID: <1993Jan22.201048.10258@rchland.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!newsgate.watson.ibm.com!yktnews2.watson.ibm.com!yktnews!admin!nordruth!seurer
References: <8267@kielo.uta.fi>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2
Path: arc1-ca.pugleaf.net!sparky!uunet!newsgate.watson.ibm.com!yktnews2.watson.ibm.com!yktnews!admin!nordruth!seurer
From: seurer@rchland.vnet.ibm.com (Bill Seurer)
Subject: Re: pascal code to modula
Sender: news@rchland.ibm.com
Message-ID: <1993Jan22.201048.10258@rchland.ibm.com>
Date: Fri, 22 Jan 1993 20:10:48 GMT
Reply-To: BillSeurer@vnet.ibm.com
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
References:  <8267@kielo.uta.fi>
Nntp-Posting-Host: nordruth.rchland.ibm.com
Organization: IBM Rochester
Lines: 28