[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | Digital Fortran |
Notice: | Read notes 1.* for important information |
Moderator: | QUARK::LIONEL |
|
Created: | Thu Jun 01 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1333 |
Total number of notes: | 6734 |
1204.0. "# as continuation line is not a good idea." by BACHUS::SABLON (Mich�le Sablon, TP/IM Support Belgium 856-7238) Thu Feb 27 1997 12:21
OSF V3.2-* & 4.0-*
dfa401
A customer, currently migration to Digital UNIX, got strange
compilation errors with some of his programs while using the option
-fpp. He finally identifies the problem to be caused by the use of
the '#' sign as continuation character (column 6).
The fact is, I believe, that the C compiler (and therefore the fpp)
recognizes as macro indicateur the # when it is the first non-blank
character.
Conflicting with the legal use in FORTRAN of this character as
continuation sign.
A restriction to document, maybe ? And a usage to avoid, surely. But
who knew at the time they wrote the programs that C would become so
central ?
Best,
Mich�le
-----
Fyi, the small sample exercice:
tt.f
program tt
print *,
# 1
stop
end
$ f77 -o toto1 -fpp toto1.f
------------------------------------------------------------------------
toto1.f:
3: # 1
^
** warning on line 3 in toto1.f: line directive is missing file name.
fort: Severe: toto1.f, line 2: Variable name, constant, or expression invalid it
print *,
---------------^
T.R | Title | User | Personal Name | Date | Lines |
---|
1204.1 | | QUARK::LIONEL | Free advice is worth every cent | Thu Feb 27 1997 12:57 | 7 |
| Um... if the customer doesn't want to run the program through the preprocessor,
then they shouldn't ask the driver to do so. What's the issue? If the customer
is going to use preprocessor directives in their source, then it's up to them
to make sure that anything that looks like a directive IS a directive. # is
not typically used as continuation and is non-standard.
Steve
|
1204.2 | | BACHUS::SABLON | Mich�le Sablon, TP/IM Support Belgium 856-7238 | Fri Feb 28 1997 03:37 | 7 |
| No real issue Steve. Just wanted to raise the point.
I'm also glad to ear it is a non-standard.
Best,
Mich�le.
|