- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I produce no leading zero in real output using VF 6.6A compiler?
I am porting a code from RS/6000 that does not report leading zeroes in real output.
I am porting a code from RS/6000 that does not report leading zeroes in real output.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the Visual Fortran Language Reference Manual, the F edit descriptor requires that output values have at least one digit to the left of the decimal point. With the E and D descriptors, though, a zero to the left of the decimal point is optional. It seems that changing your FORMAT statements to write out values in exponential notation with an appropriate field width would suppress leading zeros.
Another option is to write the values to a character field as an internal file and then to scan the field and manually remove leading zeros.
I don't know if there's a compiler option to control this.
Mike
Another option is to write the values to a character field as an internal file and then to scan the field and manually remove leading zeros.
I don't know if there's a compiler option to control this.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can try PowerStation compatibility /fpscomp I believe it didn't use leading zeros.
James
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, there's no option for this - sorry.
Steve
Steve

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