home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8517 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.4 KB  |  32 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!jkorpela
  3. From: jkorpela@snakemail.hut.fi (Jukka Korpela)
  4. Subject: Re: help
  5. In-Reply-To: csfraw@vehka.cs.uta.fi's message of 24 Jan 93 13:41:16 GMT
  6. Message-ID: <JKORPELA.93Jan25145632@lk-hp-10.hut.fi>
  7. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  8. Nntp-Posting-Host: lk-hp-10.hut.fi
  9. Organization: Helsinki University of Technology, Finland
  10. References: <8290@kielo.uta.fi>
  11. Date: 25 Jan 93 12:56:32 GMT
  12. Lines: 18
  13.  
  14. You asked what is the effect of
  15.        i := i or j ;
  16. if i and j are of type integer.
  17.  
  18. There have been replies which are probably valid for Turbo Pascal.
  19. But please notice that this is a language extension. In standard
  20. Pascal, such a construct is an error which must be detected
  21. by the compiler, since the only allowable operand type for the
  22. "or" operator is Boolean. - If you have code which uses the "or"
  23. operator for integers, in order to perform the bitwise "or"
  24. operation, but your compiler does not support it, you're in trouble.
  25. In standard Pascal, the set union operator (the "+" operator for
  26. sets) provides the same functionality in principle, but it may require
  27. considerable amount of work to modify the code accordingly.
  28.  
  29. * Jukka "Yucca" Korpela, Manager of User Support
  30. * Helsinki University of Technology (HUT) Computing Centre, Finland
  31. * Internet mail address: Jukka.Korpela@hut.fi
  32.