> FUNCTION rd_choice (value, table) RESULT (iostat)
>
> IMPLICIT NONE
>
> INTEGER, INTENT (OUT) :: value
> CHARACTER (LEN = *), DIMENSION (:), INTENT (IN) :: table
> INTEGER :: iostat
>
> value = LBOUND (table)
The RHS is an array of rank 1 and size 1 so use
value = LBOUND (table,dim=1)
or more cryptically maybe
value = sum (LBOUND(table)) ! or max,min
You cannot assign an expression known at compile time to be
size 1 rank one to a scalar - some people feel that this should be allowed.
... Seems a rather complicated way to get the value 1.
Harvey
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|