This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: comments in Fortran


Hmmm, I see I forgot to include the definition of "character context"
in my previous mail.  Here goes:

A character context means characters within a character literal constant
or within a character string edit descriptor [which is basically also a
character literal constant].

...

A character literal constant is written as a sequence of characters,
delimited by either apostrophes (') or quotation marks (").

The delimiting apostrophes or quotation marks are not part of the value
of the character literal constant.

An apostrophe character within a character constant delimited by
apostrophes is represented by two consecutive apostrophes (without inter-
vening blanks); in this case, the two apostrophes are counted as one
character.  Similarly, a quotation mark character within a character
constant delimited by quotation marks is represented by two consecutive
quotation marks (without intervening blanks) and the two quotation marks
are counted as one character.

A zero-length character literal constant is represented by two consecutive
apostrophes (without intervening blanks) or two consecutive quotation marks
(without intervening blanks) outside of a character context.

- - - - - - END-OF-STANDARD-QUOTATION - - - - - - - - - - - - - - - - -

Note that preprocessing Fortran source falls outside the scope of the
Standard, so if some of it is to hard to implement, we might consider
it to be "limited by the implementation".

Specifically, there's no rule about macro substitution with "character
context", so we might make up our own rules here.  However, if we differ
from the other Fortran compilers out there (with most, if not all, of them
supporting preprocessing), that would surely be seen as a "quality of
implementation" issue :-(

Hope this helps,
Toon.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]