(j3.2006) Assignment to ero-sized strings and arrays

Walt Brainerd walt.brainerd
Tue May 26 18:27:06 EDT 2015

I am willing to try this one more time.

Tell me I am crazy, stupid, or whatever; it has happened before.

But to ignore this puzzles me. Is anybody going to correct this error? of the F08 standard says:

No value is assigned to the variable if it is of type character and zero
length, or is an array of size zero.

It is still in N2014, if that is the latest.

Consider the program:

program f
character(len=:), allocatable :: c
c = ""
print *, len(c), "X"//C//"X"
c = "QQQ"
print *, len(c), "X"//C//"X"
end program f

The sentence quoted says that the second assignment does not
assign the value QQQ because the length of c is zero. I don't
think that is what is intended.

Just delete the sentence' it was silly, but wasn't wrong in F95.

Walt Brainerd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20150526/33327fb0/attachment.html 

More information about the J3 mailing list