- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
at the moment I have some problem with writing a file in a special format. The original typical lines, allegedly on a PC but could be a different compiler, looks like these:
-229 1 1.01802952E-03 60.0000000 -9.32892486E-02 0.00000000E+00
-93 24 1.10837603E-02 1030.80005 -0.444472462 7.12094307
With IVF compiler, same code, same format, I get
-229 1 1.0180390E-03 60.00000 -9.3300067E-02
0.0000000E+00
-93 24 1.1083824E-02 1030.800 -0.4444780
7.120943
which fits to the Intel Fortran Language Reference. Following the reference, the list-directed sequential write statement handles variables like
INTEGER(4) --> I12
REAL(4) --> G15.7E2
That means IVF fills the rest of the I12 and G15.7E2 with spaces and aligns the values to the right. While in the original file it does not. That produces problems when reading this file. Does anyone know a way to change the output so that it fits to the original output? Or do I have to change the READ-format for reading this file?
Well damn it, spaces are not shown here like I pasted them.Just took screenshots to show:
Original: http://img80.imageshack.us/my.php?image=alfredagroriginal4vw.gif
New: http://img80.imageshack.us/my.php?image=alfredagrneu6by.gif
at the moment I have some problem with writing a file in a special format. The original typical lines, allegedly on a PC but could be a different compiler, looks like these:
-229 1 1.01802952E-03 60.0000000 -9.32892486E-02 0.00000000E+00
-93 24 1.10837603E-02 1030.80005 -0.444472462 7.12094307
With IVF compiler, same code, same format, I get
-229 1 1.0180390E-03 60.00000 -9.3300067E-02
0.0000000E+00
-93 24 1.1083824E-02 1030.800 -0.4444780
7.120943
which fits to the Intel Fortran Language Reference. Following the reference, the list-directed sequential write statement handles variables like
INTEGER(4) --> I12
REAL(4) --> G15.7E2
That means IVF fills the rest of the I12 and G15.7E2 with spaces and aligns the values to the right. While in the original file it does not. That produces problems when reading this file. Does anyone know a way to change the output so that it fits to the original output? Or do I have to change the READ-format for reading this file?
Well damn it, spaces are not shown here like I pasted them.Just took screenshots to show:
Original: http://img80.imageshack.us/my.php?image=alfredagroriginal4vw.gif
New: http://img80.imageshack.us/my.php?image=alfredagrneu6by.gif
Message Edited by h-faber on 06-13-200602:55 AM
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
just ignore my question. In the meantime it has become clear that the READ is flexible enough to accept the different number of spaces between the values.
just ignore my question. In the meantime it has become clear that the READ is flexible enough to accept the different number of spaces between the values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When posting formatted text here, use the "Code" button if you are using MSIE, or use HTML "pre" tags is using other browsers.
The exact format of list-directed output is highly implementation dependent. The standard specifies the particular edit descriptor type to use, but allows the implementation to choose values for w, d and e, as well as when to start new records.
List-directed input is extremely forgiving, especially regarding spacing. Be careful of character items, though - if you use list-directed output, you should open the file with DELIM= to specify 'QUOTE' or 'APOSTROPHE' to cause the strings to be delimited, otherwise you are likely to get errors on input.
The exact format of list-directed output is highly implementation dependent. The standard specifies the particular edit descriptor type to use, but allows the implementation to choose values for w, d and e, as well as when to start new records.
List-directed input is extremely forgiving, especially regarding spacing. Be careful of character items, though - if you use list-directed output, you should open the file with DELIM= to specify 'QUOTE' or 'APOSTROPHE' to cause the strings to be delimited, otherwise you are likely to get errors on input.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page