Re: Variable length/precision formats?



glen herrmannsfeldt wrote:
....
It is variable, it is a format, and it is an expression. It
does allow the repeat factor, field width, and number of digits
to be specified as a variable. What else do you want?

He wants the wierd, indirect, on-the-fly modification of the
format *while* the I/O list it controls is still being processed.
Mystification of the reader seems to be his real intent.

Next he'll want to be able to change the unit number on the
fly:

Read(N, fmt) x, y, z, N, some, more, stuff

Will this really read the last three elements from a different
file than the first three? Which file will it read N from? (Ok,
that has to be the first of the two files, or it can't be made to
work at all. :-) He'd probably like it even better if he could
write:

Read(N, fmt) x, y, z, M, some, more, stuff

Where M was a pointer that was associated with N in some
backhanded and concealed way. The more mystery interactions
the better, apparently.

--
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


.



Relevant Pages

  • Re: variable length of integer
    ... consecutive in the native collating sequence. ... I think that the use of achar and iachar means that the ASCII collating ... and we know that digits in ASCII are consecutive. ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: Pi.
    ... >> ...but is not standard conforming in free-form source, ... provided that the automatic tool ... I've proposed before that spaces be allowed between digits ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: F08 support of floating decimal?
    ... base 3 floating point is also rare. ... Legal for Fortran, though. ... trinary (where the digits are zero, one, and minus one) ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: Variable length/precision formats?
    ... robin wrote: ... value of FMT. ... I can't decipher what this should do if the specification ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: Is there a way like this in Fortran?
    ... and digits (where the first symbol has to be a letter and the rest ... character identifiers for variables and three or more character ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)