[Info-vax] OpenVMS RTL Screen Management (SMG$) Manual

Ken Fairfield ken.fairfield at gmail.com
Fri Aug 3 11:34:34 EDT 2012


On Friday, August 3, 2012 5:20:48 AM UTC-7, abrsvc wrote:
[...]
> 
> The above sparked another thought as well...
> 
> Fortran on the I64 platform is the F90 compiler.  While most code 
> will compile and work as expected, there are cases where behavior 
> will change.  This is more due to reliance on how the compiler 
> generated code than anything else and may be subtle.  As an example, 
> IF statements that use variables as array indices can behave 
> differently if the index is checked in the IF statement itself.  
> There is no order of evaluation specified by the standard for IF 
> statement blocks.  Some code depends upon the IF blocks being 
> evaluated left to right.  This is not guaranteed and can cause 
> problems. This is one example of a potential code behavior change 
> that moght not seem obvious.

Well, the order if evaluation of the expressions in a Fortran IF
statement has never been defined, and I believe the standards, as
far back as F77, have always warned that expressions may be evaluated
in any order.  In addition, there is no "short circuiting" in Fortran
as may be expected from other languages.  It's up to the "processor",
e.g., the compiler, what happens.

That said, I clearly remember warnings in the *VAX* Fortran 
documumentation goiong all the way back to the 3.0 release about this
aspect of expression evaluation.  So it's a problem with the code...
Also, while you *may* never have encountered this feature with VAX
Fortran, I relatively certain it would have shown itself with your
first port to Alpha.

   -Ken




More information about the Info-vax mailing list