Re: gfortran diagnostics and so on
- From: "Craig Dedo" <cdedo@xxxxxxxxx>
- Date: Fri, 23 Nov 2007 08:30:04 -0600
"Richard Maine" <nospam@xxxxxxxxxxxxx> wrote in message news:1i7zirl.hdl6kepl696lN%nospam@xxxxxxxxxxxxxxxx
Tobias Burnus <burnus@xxxxxxxx> wrote:
I don't know how to handle this best. Backslashes are difficult as
some people expect that "\" prints a backslash, others want to have
"\n" as new line -- and both want to have their choice as default.
With either choice, you have unhappy users. But I am open to
suggestions.
Well, in f0003, backslash is part of the standard Fortran character set.
So I'll find it awfully hard to accept as reasonable a default that
doesn't conform to the standard. But then I'm one of those who has
always thought that doing backslash processing on Fortan code was an
unreasonable default, so just consider me biased.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
I wholeheartedly agree with Richard. Because the backslash is part of the standard Fortran character set, the default behavior should be the printable character, **NOT** some kind of magic introductory character that transforms the interpretation of following character(s). Compiler defaults should always follow the Fortran standard, wherever applicable.
Just because C uses backslash as a magic introductory character does not mean that Fortran should follow that practice. Although some may disagree, I have always thought that part of the spirit of Fortran is that it is designed to make life easy for the application developer. What you write on the blackboard is what you write in the source code. Among other things, that means that printable characters are exactly that, no more and no less.
There are reasonable alternatives for programmers who want the C language behavior. The one I like best is to use one of the popular extensions to designate a particular literal string according to the C language.
If a programmer wants control characters in character strings, the programmer can always use the CHAR() or ACHAR() intrinsic functions. The programmer also can define a module that defines all of the control characters as named constants. I have done that and it works very well.
--
Craig Dedo
17130 W. Burleigh Place
P. O. Box 423
Brookfield, WI 53008-0423
Voice: (262) 783-5869
Fax: (262) 783-5928
Mobile: (414) 412-5869
E-mail: <cdedo@xxxxxxxxx> or <craig@xxxxxxxxxx>
.
- Follow-Ups:
- Re: gfortran diagnostics and so on
- From: glen herrmannsfeldt
- Re: gfortran diagnostics and so on
- From: Gary Scott
- Re: gfortran diagnostics and so on
- From: Steven G. Kargl
- Re: gfortran diagnostics and so on
- References:
- gfortran diagnostics and so on
- From: James Van Buskirk
- Re: gfortran diagnostics and so on
- From: Tobias Burnus
- Re: gfortran diagnostics and so on
- From: Richard Maine
- gfortran diagnostics and so on
- Prev by Date: Re: Object Oriented Optimization
- Next by Date: Re: Read binaries from matlab
- Previous by thread: Re: gfortran diagnostics and so on
- Next by thread: Re: gfortran diagnostics and so on
- Index(es):
Relevant Pages
|