PDA

View Full Version : Re: [Fwd: [LF] SIZE intrinsic]


Lahey Support
08-15-2003, 01:24 AM
Hello,

In short, 10 is an initialization expression.

Per Håkan Lundow wrote:
>
<snip>

> Perhaps I am being unfair when taking this sentence out
> of context but it still seems false to me, no offense
> intended. To clear things out I have pasted in the relevant
> parts of The Standard at the bottom of the mail. According
> to point (6) I can have a SIZE reference in my PARAMETER
> statement, eg:
>
> PROGRAM Test
> INTEGER :: x( 10 )
> INTEGER, PARAMETER :: n = SIZE (x)
> WRITE(*,*) n
> END PROGRAM Test

All true, but in

subroutine test( x)
integer :: x(:)
integer, parameter :: n = size( x)
etc

the bounds of each dimension of x is not an
initialization expression.

<snip rest>

--

Cheers!
Dan Nagle [address removed]
Purple Sage Computing Solutions, Inc.
----------------------------------------------------------
To unsubscribe, send to [address removed] the following
as the first and only line of the message body:
unsubscribe fortran
----------------------------------------------------------