[Patch, Fortran] Experimental LEN_TRIM and TRIM patch
Tobias Burnus
burnus@net-b.de
Wed Feb 11 21:41:00 GMT 2009
Daniel Kraft wrote:
> PS: BTW, while gfortran does not complain about CHARACTER(LEN=0)
> (don't know if this is legal), for LEN=-1 one gets "Warning: CHARACTER
> variable has *zero* length" which sounds quite a little confusing.
In "4.4.4 Character type" one finds: "The length is a type parameter;
its value is greater than or equal to zero." and later "If the character
length parameter value evaluates to a negative value, the length of
character entities declared is zero." In that sense, the warning is
valid "-1" is converted into "0"; however, I agree that the warning is
odd. I would vote for removing the warning.
Tobias
More information about the Fortran
mailing list