🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4436

Re: Questions about IF

#4436
From: Al Dunbar
Date: Sat, 29 Jun 1991 15:33
27 lines
1504 bytes
In article <JROWE.91Jun26111343@exua.exua.exeter.ac.uk>, JRowe@exua.exeter.ac.uk (John Rowe) writes:
>In article <26384@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes:
> 
>>   Actually, the standard does require that no optimization 
>>   violate parenthesis.  So you can force the order of
>>   evaluation any way you want:
> 
>>        If (expr1 .and. (expr2.and.expr3)) then
>>           ...
> 
>>   This does the second '.and.' first.
> 
>But can it choose to evaluate:
> 
>         If ((expr2.and.expr3) .and. expr1) then
> 
>I didn't see anything that said it couldn't.
> 
 
Exactly. This does not violate parenthesis. Assuming no side
effects, the results of both of the above would be the same.
 
 -------------------+-------------------------------------------
 Al Dunbar          | 
 Edmonton, Alberta  |  Disclaimer: "not much better than
 CANADA             |                  datclaimer"    
 -------------------+-------------------------------------------
Technical Details
Message-ID: <RN.1360@mts.ucs.UAlberta.CA>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!unixg.ubc.ca!brazeau.ucs.ualberta.ca!alberta!mts.ucs.UAlberta.CA!Al_Dunbar
References: <scNB_TG00WBMQ0ykwM@andrew.cmu.edu> <JROWE.91Jun26111343@exua.exua.exeter.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!unixg.ubc.ca!brazeau.ucs.ualberta.ca!alberta!mts.ucs.UAlberta.CA!Al_Dunbar
From: userAKDU@mts.ucs.UAlberta.CA (Al Dunbar)
Newsgroups: comp.lang.fortran
Subject: Re: Questions about IF
Message-ID: <RN.1360@mts.ucs.UAlberta.CA>
Date: Sat, 29 Jun 91 15:33:26 GMT
Organization: MTS Univ of Alberta     
References: <scNB_TG00WBMQ0ykwM@andrew.cmu.edu> <JROWE.91Jun26111343@exua.exua.exeter.ac.uk>
Lines: 27