Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA
Path: utzoo!watmath!clyde!cbosgd!ucbvax!harvard.harvard.edu!stew%lhasa
From: stew%lhasa@HARVARD.HARVARD.EDU
Newsgroups: fa.info-vax
Subject: Re:  another fortran problem?
Message-ID: <8509202016.AA21880@UCB-VAX.ARPA>
Date: Fri, 20-Sep-85 13:59:00 EDT
Article-I.D.: UCB-VAX.8509202016.AA21880
Posted: Fri Sep 20 13:59:00 1985
Date-Received: Sun, 22-Sep-85 06:46:49 EDT
Sender: usenet@ucbvax.ARPA
Reply-To: info-vax@ucb-vax.arpa
Organization: The ARPA Internet
Lines: 7

Fortran programs which rely on the order of evaluation of expressions
are in error.  Checking a variable before calling a function in a logical
expression like (a() .and. b) is a valid and valuable optimization.  If
you must ensure that function a() is always called, make it two separate
if's or call it and save the value before testing.

Stew