For Programmers: Free Programming Magazines  


Home > Archive > Fortran > February 2008 > Re: Variable Format Expressions (VFEs) (Was: Difference between Intel









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 Re: Variable Format Expressions (VFEs) (Was: Difference between Intel
GaryScott

2008-02-14, 7:14 pm

On Feb 14, 1:24=A0pm, "jamesgi...@att.net" <jamesgi...@att.net> wrote:
> On Feb 14, 8:27=A0am, "Craig Dedo" <cd...@wi.rr.com> wrote:
>
>
>
>
>
>
>
>
nd[color=darkred]
..[color=darkred]
> ...
could be.[color=darkred]
[color=darkred]
th the[color=darkred]
gy for[color=darkred]
stantial[color=darkred]
>
> VFEs cannot be applied to all character strings. =A0In fact, they can't
> be
> applied to all strings that are used as formats. =A0Only those formats
> that
> are literals in the I/O statement and those defined in a FORMAT
> statement
> may have VFEs in them. =A0In my case, that pretty much excludes using
> them
> at all.
>
> Further, the VFEs don't establish a meaning of the format string at
> the
> start of the I/O statement in which they're used, they are evaluated
> when the I/O sequence reaches that point in the format. =A0This means
> they may be evaluated multiple times (format reversion). =A0They might
> reference variables that are I/O list items - and if this is a READ,
> their meaning is even tougher to discern. =A0And what if the VFE is the
> count for a left TAB specifier? =A0You could be processing an unknown
> portion of the input an unknown number of times. =A0Where do you draw
> the line?
>
> I much prefer extending string concatenate so that it's defined mixed-
> mode on integers as well. =A0I already do this:
>
> =A0 =A0fmt =3D "(5x, " // n // "I" // w // ")"
>
> Here, the integer variables (or named constants) N and W supply the
> number and width of the I specifier. =A0I can then use this as a format
> in an I/O statement. =A0Or, I can use the same feature to create strings
> that contain converted numbers for other purposes. =A0My implementation
> of concatenate doesn't use internal I/O, so it doesn't conflict with
> pre-f2003 "recursive I/O" requirements and it's faster. =A0I find it
> more
> legible.


Wonderful, looks just like REXX except the concatenation operator is
implied in REXX.

>
> --
> 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." =A0 -- =A0C. A. R. Hoare- Hide qu=

oted text -
>
> - Show quoted text -


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com