PDA

View Full Version : [LF] SIZE intrinsic


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

I have two challenging questions for the Fortran 90 mind.
First, how is the intrinsic SIZE implemented. This is not in the
standard, but there must be a common strategy. Namely, we are all aware
that extra information has to be passed with the array for SHAPE and
SIZE to work. Where is this extra information? Fortran 77 passes a
simple address for arrays, and Fortran 90 must comply. So is this extra
information maybe in the address before the array beginning?

Also, Lahey complains to the following code, which to me seems like a
fine specification statement:
SUBROUTINE Test(array)
REAL, DIMENSION(:) :: array
! Here is the statement that lf95 considers a bad specification
statement:
INTEGER, PARAMETER :: array_size=SIZE(array)
....
END SUBROUTINE Test
I get an error like "invalid type, attribute or size for actual argument
of intrinsic size". If I change it to:
INTEGER :: array_size
array_size=SIZE(array)
Everything works fine?!?

Please help,
Aleksandar
--
_____________________________________________
Donev Aleksandar
[address removed]
Physics Department, Michigan State University
(517) 432-6770
_____________________________________________


-----------------------------------------------------
To unsubscribe from the Fortran Forum, send a message
to [address removed] with the following command as
the first and only line of the message body:
unsubscribe fortran
-----------------------------------------------------