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