Compulsory spaces in free source form
From: John Harper (harper_at_mcs.vuw.ac.nz)
Date: 09/30/04
- Next message: James Giles: "Re: Compulsory spaces in free source form"
- Previous message: James Giles: "Re: a history question"
- Next in thread: James Giles: "Re: Compulsory spaces in free source form"
- Reply: James Giles: "Re: Compulsory spaces in free source form"
- Reply: Richard E Maine: "Re: Compulsory spaces in free source form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Sep 2004 22:06:31 GMT
The f95 standard requires a blank between a statement keyword, name,
constant or label and an adjacent name, constant or label in free source
form, and it's obvious why if, for example, a constant has a name. But
it's a pity that the rule prevents things like STOP'Now' where ambiguity
is impossible. (Some compilers e.g. g95 catch this error, others don't.)
But there are cases like PRINT* and STOP666 where the * or the 666 seems
not to be a name, constant or label (666 in some contexts is a constant
but here it's a string of up to 5 digits). The blank is then presumably
not needed, even though STOP666 looks as if it could also be the name
of a variable. F95 compilers disagree on how they treat the program
below; is it standard-conforming in free source form?
STOP666 = 666
PRINT*,'STOP666 =',STOP666
STOP666
END
John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington, New Zealand
e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5341 fax (+64)(4)463 5045
- Next message: James Giles: "Re: Compulsory spaces in free source form"
- Previous message: James Giles: "Re: a history question"
- Next in thread: James Giles: "Re: Compulsory spaces in free source form"
- Reply: James Giles: "Re: Compulsory spaces in free source form"
- Reply: Richard E Maine: "Re: Compulsory spaces in free source form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]