home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / modula2 / 1726 < prev    next >
Encoding:
Text File  |  1993-01-22  |  786 b   |  29 lines

  1. Newsgroups: comp.lang.modula2
  2. Path: sparky!uunet!psgrain!randy
  3. From: randy@psg.com (Randy Bush)
  4. Subject: Re: pascal code to modula
  5. Message-ID: <1993Jan22.163533.8577@psg.com>
  6. Organization: Pacific Systems Group, Portland Oregon, US
  7. References: <8267@kielo.uta.fi>
  8. Date: Fri, 22 Jan 1993 16:35:33 GMT
  9. Lines: 18
  10.  
  11. csfraw@vehka.cs.uta.fi (Francis Akoto) writes:
  12. > This is a pascal code
  13. >    i,j: integer ;
  14. >    i := i or j ;
  15.  
  16. That most certainly is *not* Pascal code.
  17.  
  18. If you are trying to achieve a bitwise inclusive OR of the two integers, then
  19. you would have to go through tagless variant records in a dirty hack.
  20.  
  21. To do this in Modula-2, one would do something like
  22.  
  23.     VAR i, j : INTEGER;
  24.     i := INTEGER ( BITSET(i) OR BITSET(j) )
  25.  
  26. randy
  27. -- 
  28. randy@psg.com   ...!uunet!m2xenix!randy
  29.