Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!spdcc!tauxersvilli!alphalpha!nazgul From: nazgul@alphalpha.com (Kee Hinckley) Newsgroups: comp.sys.apollo Subject: Re: The wonderful Pascal compilier... Message-ID: <1990Nov14.031722.15456@alphalpha.com> Date: 14 Nov 90 03:17:22 GMT References: <43023@cci632.UUCP> Organization: asi Lines: 32 In article <43023@cci632.UUCP> mth@cci.com (Michael Hickman) writes: > while not((this_net = nil) or > ((this_net^.plusminus = net.plusminus) and > (this_net^.net_name = net.net_name))) do > >Looks like it tried evaluating the expression after the 'or' when the pointer >was nil. I changed it to this: ... >guru, so if anyone can shed some light on this, please do. Otherwise, this is just >another example of Apollo's great compilier technology..... I wouldn't knock Apollo's compilers quite so fast. The generate pretty good code, even if they do take forever to do it. But any way, I believe you have run into a feature of Pascal. Namely that the order of expression evaluation is not guaranteed. It's been a while, but I believe that Apollo's Pascal has an 'andthen' operator for just such cases, I assume there's something equivalent for 'or', but I don't recall what. Presumably 10.3 added some compiler optimization or some such that made it decide it was faster to interpret the expression some other way. Now why you went into an infinite loop is another problem. That definitely sounds like a bug somewhere. -- Alphalpha Software, Inc. | motif-request@alphalpha.com nazgul@alphalpha.com |----------------------------------- 617/646-7703 (voice/fax) | Proline BBS: 617/641-3722 I'm not sure which upsets me more; that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.