newline

newline

[pre]print *, "123
456"[/pre] results in
[pre] 123
456[/pre]
but i want
[pre]123
456[/pre]
how can easily get this, is there a compiler option?
of course i could use
[pre]print *, "123", "n456"[/pre]
but i don't like this.

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Isn't that an ugly feature?! -vms will get you what you want. In 8.0, this
recognition will be off by default and there will be a new switch to turn it on if you want it.

Steve

Steve - Intel Developer Support

thanks! (but:)

ugly?: yes. and funny:

program backslash
print *, ""
end program

compiling gives (an error message twice as long as the program):

   program BACKSLASH

print *, ""
          ^
Warning 18 at (2:backslash.f90) :  used as an escape character is an extension to standard Fortran 95
            ^
Error 5 at (2:backslash.f90) : incomplete string

1 Error
compilation aborted for backslash.f90 (code 1)

i didn't want to use it as an escape character! ;-)

!!! unfortunately this message remains when compiling with -vms !!! ???

i use:

Intel Fortran Compiler for 32-bit applications, Version 7.1   Build 20030701Z
Copyright (C) 1985-2003 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

GNU ld version 2.13.90.0.2 20020802
  Supported emulations:
   elf_i386
   i386linux
   elf_i386_glibc21

ifc -nbs sandwich.f90
program BACKSLASH

3 Lines Compiled
tim@linux:/windows/E/src/net> ./a.out

Intel Fortran Compiler for 32-bit applications, Version 7.1 Build 20030412Z

FOR NON-COMMERCIAL USE ONLY
GNU ld version 2.13.90.0.2 20020802
Supported emulations:
elf_i386
i386linux
elf_i386_glibc21

correction (sorry, cut and paste problem):

GNU ld version 2.11.90.0.29 (with BFD 2.11.90.0.29)

As Tim suggests, add -nbs. This too won't be needed in 8.0. (Grumble - I hate it when Fortran implementors think they're writing a C compiler instead...)

Steve

Steve - Intel Developer Support

yes, now it works.

thank you both.

yes, i also like C, but i would appreciate that people are able to distinguish.

greetings,

sandwich

i have to correct:

as seen in the example below i could not use

print *, "123"

.

Why not? What happens? It seems to work for me with -vms and -nbs specified.

Steve

Steve - Intel Developer Support

no, i meant without these options (my first message).

Leave a Comment

Please sign in to add a comment. Not a member? Join today