Hi, there is probably a compiler switch which turns off the use of \ as an
escape character -- at least there is for intel -nbs
and for pgi -Mbackslash
It is exactly in character strings that this \ escape character can be
used -- apparently the meaning is like in C.
It seems to me unfortunate that the default is to allow this extension and
that you need to use an option to turn it off. Apparently they assume
everyone is a C programmer first and a FORTRAN programmer second.
Good luck, Wes
On Thu, 30 Jan 2003, Aleksandar Donev wrote:
> Hello,
>
> I am trying to compile FLIB with a new compiler and am getting a weird
> error for the harmless line:
>
> CALL CHR_SAR("\","/", buf)
> ^
> Warning : \ used as an escape character is an extension to standard
> Fortran 95
> ^
> Error : incomplete string
> ...
>
> I don't even know what \ is used for in these extensions (and the
> compiler should have figured out that this is part of a string!!!), but
> I am assuming it means end of line.
>
> I am *not* using any special compilation switches.
>
> Any ideas what I can do?
> Thanks,
> Aleksandar
Dr. W. J. Metzger Experimental High Energy Physics Group
tel. +31-24-3653127 Faculty of Natural Sciences
+31-24-3652099 (secr.) University of Nijmegen
fax. +31-24-3652191 Toernooiveld 1
telex 48228 wina nl 6525 ED Nijmegen, The Netherlands
e-mail: [log in to unmask] or [log in to unmask]
http://home.cern.ch/metzger/ or http://www.hef.kun.nl/~wes
|