Fortran::Format

Fortran::Format is a Perl module to read and write data according to a standard Fortran 77 FORMAT.
Download

Fortran::Format Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ivan Tubert-Brohman
  • Publisher web site:
  • http://search.cpan.org/~itub/

Fortran::Format Tags


Fortran::Format Description

Fortran::Format is a Perl module to read and write data according to a standard Fortran 77 FORMAT. Fortran::Format is a Perl module to read and write data according to a standard Fortran 77 FORMAT.SYNOPSYS use Fortran::Format; my $f = Fortran::Format->new("2('N: ',I4,2X)"); print $f->write(1 .. 10); # prints the following: # N: 1 N: 2 # N: 3 N: 4 # N: 5 N: 6 # N: 7 N: 8 # N: 9 N: 10 # if you don't want to save the format object, # just chain the calls: Fortran::Format->new("2('N: ',I4,2X)")->write(1 .. 10);This is a Perl implementation of the Fortran 77 formatted input/output facility. One possible use is for producing input files for old Fortran programs, making sure that their column-oriented records are rigorously correct. Fortran formats may also have some advantages over printf in some cases: it is very easy to output an array, reusing the format as needed; and the syntax for repeated columns is more concise. Unlike printf, for good or ill, Fortran-formatted fields never exceed their desired width. For example, compare printf "=", 12345; # prints "12345" print Fortran::Format->new("I3")->write(12345); # prints "***"This implementation was written in pure Perl, with portability and correctness in mind. It implements the full ANSI standard for Fortran 77 Formats (or at least it should). It was not written with speed in mind, so if you need to process millions of records it may not be what you need. Requirements: · Perl


Fortran::Format Related Software