Russell, Richard wrote:
> The string to be deciphered by the read must be 5*'abc' (total
> seven characters). So you want the setting of variable "a" to
> be: a='5*''abc''' (if I got that right). The free format (*) needs
> a way to distinguish insignificant blanks from the string to be read,
> so the quotes are needed.
As can be seen below, there are no blanks in the string to be read,
significant or insignificant. The standard *could* be interpreted as
requiring delimiters in order to distinguish the repeat count from
the string. As I've pointed out though, that's probably an unintended
reading of the standard.
Jean Vezina wrote:
...
> character*10 a
> character*3 abc(5)
> a = '5*abc'
> read(a,*)abc
> print *,abc
> end
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
|