home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.scheme
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!wupost!uwm.edu!daffy!spock.cs.wisc.edu!quale
- From: quale@spock.cs.wisc.edu (Doug Quale)
- Subject: Re: applying or
- Message-ID: <1993Jan7.030412.15056@daffy.cs.wisc.edu>
- Sender: news@daffy.cs.wisc.edu (The News)
- Organization: University of Wisconsin -- Madison
- References: <1993Jan5.165545.11990@neptune.inf.ethz.ch> <1993Jan6.164736.10682@daffy.cs.wisc.edu> <1993Jan6.215411.28927@neptune.inf.ethz.ch>
- Date: Thu, 7 Jan 1993 03:04:12 GMT
- Lines: 26
-
- In article <1993Jan6.215411.28927@neptune.inf.ethz.ch> marti@nugget.inf.ethz.ch (Robert Marti) writes:
- >
- >However, Wirth himself assumed that Pascal implementations would always
- >evaluate both Boolean sub-expressons as can be seen e.g. in his Pascal
- >code in the 1st edition of "Algorithms and Data Structures".
- >Example:
- > if p <> nil then
- > if p^.key = x then
- > begin
- > (* do something here *)
- > end
- >
-
- I'm not trying to start a fight, but I read this completely differently.
- Wirth recognized that a Pascal implementation *may* evaluate both sides
- of the and. I don't see any way from this example to conclude that
- implementations will *always* evaluate both sides. Because short-circuit
- evaluation is not required by Pascal you can never assume it, so you
- have to code that way.
-
-
-
-
- --
- Doug Quale
- quale@saavik.cs.wisc.edu
-