| 1 |
Fortran::Format version 0.90 |
| 2 |
============================ |
| 3 |
|
| 4 |
This is a Perl implementation of the Fortran 77 formatted input/output |
| 5 |
facility. One possible use is for producing input files for old Fortran |
| 6 |
programs, making sure that their column-oriented records are rigorously |
| 7 |
correct. Fortran formats may also have some advantages over C<printf> in some |
| 8 |
cases: it is very easy to output an array, reusing the format as needed; and |
| 9 |
the syntax for repeated columns is more concise. Unlike C<printf>, for good or |
| 10 |
ill, Fortran-formatted fields B<never> exceed their desired width. For |
| 11 |
example, compare |
| 12 |
|
| 13 |
printf "%3d", 12345; # prints "12345" |
| 14 |
print Fortran::Format->new("I3")->write(12345); # prints "***" |
| 15 |
|
| 16 |
This implementation was written in pure Perl, with portability and correctness |
| 17 |
in mind. It implements the full ANSI standard for Fortran 77 Formats (or at |
| 18 |
least it should). It was not written with speed in mind, so if you need to |
| 19 |
process millions of records it may not be what you need. |
| 20 |
|
| 21 |
CHANGES SINCE VERSON 0.54 |
| 22 |
|
| 23 |
- Added reading support! (some bugs may be lurking there) |
| 24 |
- INCOMPATIBLE CHANGE: matrices will be transposed on writing; |
| 25 |
non-rectangular nested arrays result in undefined behavior. |
| 26 |
- Fixed bug where 2(I8),I2 would reuse only the 2(I8) on subsequent |
| 27 |
lines instead of reusing the whole format string. |
| 28 |
|
| 29 |
INSTALLATION |
| 30 |
|
| 31 |
To install this module type the following: |
| 32 |
|
| 33 |
perl Makefile.PL |
| 34 |
make |
| 35 |
make test |
| 36 |
make install |
| 37 |
|
| 38 |
DEPENDENCIES |
| 39 |
|
| 40 |
None, except Test::Simple and Test::Pod for testing. |
| 41 |
|
| 42 |
COPYRIGHT AND LICENSE |
| 43 |
|
| 44 |
Copyright (C) 2005 Ivan Tubert-Brohman <[email protected]> |
| 45 |
|
| 46 |
This library is free software; you can redistribute it and/or modify |
| 47 |
it under the same terms as Perl itself. |
| 48 |
|