Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 Discussions

Ansi C Escape Sequences in Fortran

cjosefy
Beginner
942 Views
I've noticed that both g77 and the AIX Fortran compiler allow all Ansi C Escape Sequences to be in Fortran Character Strings. This is not the cases with the Intel Compiler. I know there is a convention to create C strings so that some escape sequences are valid ( 'test 'C ).
I don't see anything in my reading of the standards that says Fortran should allow escape sequences. Am I correct in assuming that the behavior of g77 and AIX Fortran is non-standard and perhaps the product of the code being actually converted to C during compilation?
Thanks!
0 Kudos
3 Replies
Steven_L_Intel1
Employee
942 Views
One could make a good argumnent that these implementations are non-standard, though since backslash isn't in the "Fortran character set", what it does isn't strictly specified by the standard.

You can get that behavior by adding -assume bacc
0 Kudos
cjosefy
Beginner
942 Views
Thanks once again for the quick response and valuable information.
I think you had a typo and means to put -assume bscc

Message Edited by cjosefy on 06-17-2005 12:46 PM

0 Kudos
Steven_L_Intel1
Employee
942 Views
Yes - bscc. Sorry.
0 Kudos
Reply