|
[Sponsors] |
May 23, 2003, 17:46 |
question on fortran
|
#1 |
Guest
Posts: n/a
|
hi, everybody:
I am working on writing a converter between 2 commercial software. i.e., i must parse the output of one software to the input of another software. software A's output has 5 significant digits. software B's input data field width has only 7 characters. if i use "F7.4" format to output, i lose record that >9999. if i use "E7.2", I only have 2 signicicant digits. Is there a way to do the converting job while preserve as many significant digits as possible. one way is to use nested if statements and select the right format statements accordingly. Any one knows a better method than this stupid one? Thanks to all! Tim |
|
May 24, 2003, 16:27 |
Re: question on fortran
|
#2 |
Guest
Posts: n/a
|
commercial software only has 7 characters? that's bad. Maybe you can try 'g' instead of 'e' and 'f'
|
|
May 27, 2003, 08:38 |
Re: question on fortran
|
#3 |
Guest
Posts: n/a
|
Actually, your nested loop is not so stupid - it is a good way, with relatively simple logic and coding, to optimize the output for given ranges of numbers. I'd say go with it.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 18:56 |
a strange question about Fortran | Hall | Main CFD Forum | 9 | May 18, 2004 02:48 |
Question on USER FORTRAN: GETVAR | BoZ | CFX | 2 | May 6, 2003 10:32 |
Short question on command in user fortran | Franz Thomsen | CFX | 2 | June 20, 2000 06:35 |
'C' or FORTRAN or 'C++' | Yogesh Talekar | Main CFD Forum | 20 | October 21, 1999 04:00 |