Re: backslash-issues



On 2005-06-30, Joost <jv244@xxxxxxxxx> wrote:
> ok, second round which should be F-proof (btw, -std=F doesn't seem to
> get the error message you reported, could you file a bug report, I
> don't have the F standard).

Bug report sent.

> character(len=*), parameter :: something= "\\"
> character(len=*), parameter :: backslash=something(1:1)

Tested, and found to work with the following compilers:

* G95 (GCC 4.0.0 20050129 (experimental) (g95!) Jun 28 2005)

* Fortran Company/NAG F compiler Release 20031017

> If 'warning 18' pops up, it is not quite right, because '\' is not used
> as an escape character, it is just twice a character (there could of
> course be an error that '\' is not in the character set of course).

When I compile this with NAGWare Fortran 95 compiler Release 5.0(253) i get:

test_backslash.f95:3:1: warning: unknown escape sequence: '\350'

and with Intel(R) Fortran Compiler for 32-bit applications, Version 7.0
Build 20021028Z i get:

Warning 18 at (16:test_backslash.f95) : \ used as an escape character is
an extension to standard Fortran 95


Somehow, there is still a problem as not all compilers can handle this...
are we up to round three? :-)

Regards,
Bart

--
"Share what you know. Learn what you don't."
.



Relevant Pages

  • Re: Bugs at my web site
    ... >> I don't think it's being maintained now, but given that Fortran 77 isn't ... >what might prove fatal with a new compiler. ... >that I think they are good traditional fortran, whatever some standard might ... guess at heart I'm still a scientist rather than a Real Programmer :-) ...
    (comp.lang.fortran)
  • Re: Bugs at my web site
    ... what might prove fatal with a new compiler. ... that I think they are good traditional fortran, whatever some standard might ... I hope the g95 people, after taking a good long vacation to ...
    (comp.lang.fortran)
  • Re: Integer Coersion
    ... and as this is Fortran not Delphi, ... vaguely standard conforming. ... Your compiler supports SIZEOF as do several others including my ... to be other than 8bits when cheap memory came on the scene and BURIED ...
    (comp.lang.fortran)
  • Re: Starting to doubt fortran
    ... that there were absolutely no "clever" tricks. ... time a new version of the vendors C compiler comes out. ... Fortran), it could be reliably depended upon in a portable way. ... That's beyond the standard, but many tend to be so ...
    (comp.lang.fortran)
  • Re: g77 compliance?
    ... > claims that code conforms to a standard doesn't mean that it actually ... I must admit i'm not the biggest fan of Fortran. ... > your experience leads you to suspect compiler conformance as a first ...
    (comp.lang.fortran)