Re: Outputting Formatted data to file
From: Richard Maine (nospam_at_see.signature)
Date: 10/22/04
- Next message: TSH: "Re: Which Compiler to Purchase"
- Previous message: James Van Buskirk: "Re: How does the intrinsic present work?"
- In reply to: Seth Pacha: "Outputting Formatted data to file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 22 Oct 2004 10:50:54 -0700
spacha5@yahoo.com (Seth Pacha) writes:
> I have some code that outputs data to a file that is not working as
> intended. It is older code in a fixed_format style. The code does
> not print out to a new page or double spaced as intended. Is there
> some compiler option I might need?
The code is using carriage control. That is an old and problematic feature.
It is no longer in the f2003 standard at all, though it's prior
"standardization" didn't actually achieve much. One of the issues that kept
it from achieving much was that it applies only to files meant for "printing".
There was and is no standard way to define or inquire about what files are
for printing. That is completely compiler dependent (to the extent that
the compiler can, and many do, say that no files are for printing).
Any more, this mostly isn't a Fortran issue at all. It is an issue of
printers and printer drivers, independent of programming languages.
Actually, it always was such an issue. The original "Fortran" carriage
control stuff was just material copied from the ASA printer standard of
the day... but you probably won't run into printers today meeting that
old standard. They still exist, I think, in mainframe data centers, but
you probably won't run into them.
Note that there isn't a concept of a "page" in most text file formats.
All you can do is something that will cause a new page when sent to a printer
or screen. Blank lines are easy enough.
Printers aren't terribly standardized these days, but many of them will
accept an ASCII control-L (form feed) as a new page. Aand text-to-postscript
drivers for postscript printers often translate the control-L appropriately.
There is a program around on some systems. The usual name escapes me at the
moment. Perhaps asa, or something begining with f (not very helpful, I know)
that will comvert the old asa stuff into something more likely to print
as desired. You can run it as a post-processor.
Or modify the code to print out blank lines for double-spacing and
control L for new page. (control-L is achar(12)).
-- Richard Maine email: my last name at domain domain: summertriangle dot net
- Next message: TSH: "Re: Which Compiler to Purchase"
- Previous message: James Van Buskirk: "Re: How does the intrinsic present work?"
- In reply to: Seth Pacha: "Outputting Formatted data to file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|