backslash-issues
- From: Bart Vandewoestyne <MyFirstName.MyLastName@xxxxxxxxxx>
- Date: Wed, 29 Jun 2005 20:27:38 +0000 (UTC)
While I was trying to make my code more portable by avoiding
backslashes, I have made the following program for testing some stuf,
and for as far as i could find using Google, the most portable solution
would be (please correct me I'm wrong):
character(len=*), parameter :: backslash = achar(92)
print *, "Portable solution: " // backslash
Now, just for my own safety, i always try to make my code compile with
the F-compiler... and apparently the F-compiler does not support the
ACHAR intrinsic... but it does have the CHAR intrinsic. I did not know
the difference at first, but after some Googling I've found that the A
in ACHAR stands for ASCII and so ACHAR is more portable than CHAR (which
does not by definition uses the ASCII character set).
Now this is something that I've found strange... F being a language that
tries to force the programmer 'good' programming style, wouldn't it then
have made more sense to keep the ACHAR intrinsic instead of the CHAR
intrinsic? For as far as i understand, both intrinsics do the same but
CHAR is less portable then ACHAR because it does not depend by definiton
on the ASCII character table?
Walt, any comments?
Regards,
Bart
PS: for the ones interested, i have a testprogram to play and experiment
with the backslash behavior at
http://users.telenet.be/vandewoestyne/bart/downloads/test_backslash.f95
--
"Share what you know. Learn what you don't."
.
- Follow-Ups:
- Re: backslash-issues
- From: Bart Vandewoestyne
- Re: backslash-issues
- Prev by Date: Re: I have no ideas what can it be!
- Next by Date: Re: MODULEand USE versus Argument Passing
- Previous by thread: I have no ideas what can it be!
- Next by thread: Re: backslash-issues
- Index(es):