Home > Archive > Fortran > September 2006 > Intel Fortran compiler FORMAT statement tabbing to column
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Intel Fortran compiler FORMAT statement tabbing to column
|
|
| McKinldj@westinghouse.com 2006-09-15, 7:00 pm |
| Here's the problem: When I use T148 to tab to column 148 in the
formatted line of output, it prints out with 14 <NUL> characters ahead
of the output. Is this something left over from the old days when 133
columns was the usual output file length?
PROGRAM DAN
X=1.234
WRITE(10,100) X
100 FORMAT(T148,'The value of X is',F12.5)
END PROGRAM DAN
compiled with:
Intel(R) Fortran Compiler for 32-bit applications, Version 9.0
Build 20050430Z Package ID: l_fc_p_9.0.021
Output is correct, but there are 14 binary <NUL> characters on the line
in front of the number.
McKINLDJ@westinghouse.com
| |
| Dr Ivan D. Reid 2006-09-15, 7:00 pm |
| On 15 Sep 2006 11:57:57 -0700, McKinldj@westinghouse.com
wrote in <1158346676.957359.246450@e3g2000cwe.googlegroups.com>:
> Here's the problem: When I use T148 to tab to column 148 in the
> formatted line of output, it prints out with 14 <NUL> characters ahead
> of the output. Is this something left over from the old days when 133
> columns was the usual output file length?
> PROGRAM DAN
> X=1.234
> WRITE(10,100) X
> 100 FORMAT(T148,'The value of X is',F12.5)
> END PROGRAM DAN
> compiled with:
> Intel(R) Fortran Compiler for 32-bit applications, Version 9.0
> Build 20050430Z Package ID: l_fc_p_9.0.021
> Output is correct, but there are 14 binary <NUL> characters on the line
> in front of the number.
I see no OPEN statement. What does the manual say about the
RECL for implicitly OPENed files?
--
Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
| |
| Richard Maine 2006-09-15, 7:00 pm |
| <McKinldj@westinghouse.com> wrote:
> Here's the problem: When I use T148 to tab to column 148 in the
> formatted line of output, it prints out with 14 <NUL> characters ahead
> of the output. Is this something left over from the old days when 133
> columns was the usual output file length?
That seems strange to me. I'd say it was a compiler bug. The standard
says you should end up with blank fill.
I don't see how recl should be related. If the record can't be that
long, I'd expect some kind of error message - not random strange
behavior like using nuls. Admitedly, the standard doesn't say that the
processor has to give error messages for exceeding the allowed record
length, but I'd still say it was a bug to act like this. (Just because
something isn't a standard violation doesn't mean it can't count as a
bug).
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
| |
| michael@athenavisual.com 2006-09-16, 8:00 am |
| There is no problem with the g95 Fortran Compiler
Michael
McKinldj@westinghouse.com wrote:
> Here's the problem: When I use T148 to tab to column 148 in the
> formatted line of output, it prints out with 14 <NUL> characters ahead
> of the output. Is this something left over from the old days when 133
> columns was the usual output file length?
>
> PROGRAM DAN
> X=1.234
> WRITE(10,100) X
> 100 FORMAT(T148,'The value of X is',F12.5)
> END PROGRAM DAN
>
>
> compiled with:
>
> Intel(R) Fortran Compiler for 32-bit applications, Version 9.0
> Build 20050430Z Package ID: l_fc_p_9.0.021
>
> Output is correct, but there are 14 binary <NUL> characters on the line
> in front of the number.
>
> McKINLDJ@westinghouse.com
| |
|
| See if this works or whether it produces your nulls
code:
PROGRAM DAN
X=1.234
WRITE(10,100) X
100 FORMAT(148X,'The value of X is',F12.5)
END PROGRAM DAN
If it doesn't then try this
code:
PROGRAM DAN
OPEN (10, 'DAN.TXT', STATUS='UNKNOWN')
X=1.234
WRITE(10,100) X
100 FORMAT(148X,'The value of X is',F12.5)
WRITE(10,200) X
200 FORMAT(T148,'The value of X is',F12.5)
CLOSE (10)
END PROGRAM DAN
Check the output of DAN.TXT. Are there any null characters?
If there are null characters in the first but not the second then the problem is with console I/O. If there are null characters in both then it is a compiler problem. | |
| Steve Lionel 2006-09-18, 7:01 pm |
| McKinldj@westinghouse.com wrote:
> Here's the problem: When I use T148 to tab to column 148 in the
> formatted line of output, it prints out with 14 <NUL> characters ahead
> of the output. Is this something left over from the old days when 133
> columns was the usual output file length?
Bug. I'll pass it on to the developers.
Steve
|
|
|
|
|