Print

Print


Greg Lindahl said:
> I have a dusty deck that does something like this:
>
>         integer foo(100)
>         integer bar
>
>         bar = -16000
>
>         call baz(foo(bar))
>
> Now baz() doesn't actually access foo(bar), because of some if
> statements.
>
> Is "call baz(foo(bar))" illegal? Why?

Yes.  It has never been standard-conforming.

F95, p77, 6.2.2.1 states
  "The value of a subscript in an array element shall be within the bounds
   for that dimension."

Or, since it's a "dusty" deck, the F66 standard (p17, 7.2.1.1.1) says
  "A subscript expression must be greater than zero."
(F66 did not have specifiable lower bounds.)

Both of these requirements are without qualification -- they apply to
all array elements.

Cheers,
--
...........................Malcolm Cohen, NAG Ltd., Oxford, U.K.
                           ([log in to unmask])

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________