Home > Archive > Fortran > January 2006 > Style of FORMAT statements
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Style of FORMAT statements
|
|
| David Flower 2006-01-24, 7:02 pm |
| In a separate thread, a FORMAT statement was posted something like:
111 FORMAT ( 42(F10.3,/) )
Now the interesting point about this is that the comma is redundant,
although perfectly correct. It is largely a matter of personal style,
whether one regards the '/' as some form of edit descriptor, or as a
delimiter.
What do others think ?
Dave Flower
| |
| Arjen Markus 2006-01-25, 4:12 am |
| Nowadays I seldom use extensive format-strings, but I prefer to
separate the various items of a format by commas. For instance:
I would use:
FORMAT( 42(F10.3,/), // )
instead of:
FORMAT( 42(F10.3,/)// )
or:
FORMAT( 42(F10.3/),/,/)
as I think the first one is the most readable - the comma between the
two slashes in
the last example is simply too much: two new lines or two times a new
line
Regards,
Arjen
| |
| glen herrmannsfeldt 2006-01-26, 3:59 am |
| Arjen Markus wrote:
> Nowadays I seldom use extensive format-strings, but I prefer to
> separate the various items of a format by commas. For instance:
> I would use:
> FORMAT( 42(F10.3,/), // )
> instead of:
> FORMAT( 42(F10.3,/)// )
> or:
> FORMAT( 42(F10.3/),/,/)
> as I think the first one is the most readable - the comma between the
> two slashes in the last example is simply too much:
> two new lines or two times a new line
I think they are ugly with extra commas, though some space around
the slash looks nice.
-- glen
|
|
|
|
|