Aleksander,
>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.
The compiler has interpreted \" together since it considered backslash as an
escape character. Hence it match the first quote with the third to give one
string: ", and so left the fourth quote as unmatched.
With most compilers this behaviour is optional controlled by a comandline
option.
Personally I would avoid the problem altogether and replace "\" with
CHAR(92)
Yours,
Daniel.
--------------------------------------------------------------
Dr. Dan Kidger, Quadrics Ltd. [log in to unmask]
One Bridewell St., Bristol, BS1 2AA, UK 0117 915 5505
----------------------- www.quadrics.com --------------------
|