In the previous example, both the ASCII and binary variables were defined to be doubles. Binary longs, which are 4-byte integers, may be more portable across different platforms than binary doubles or floats.
To convert the ASCII data in latlon.dat to binary longs:
newform latlon.dat -f latlon2.fmt -o latlon2.bin
It creates the binary archive file latlon2.bin with the 20
latitude and longitude values in latlon.dat stored as binary
longs.
This example duplicates one in chapter 2. If you completed that
example, an error message will indicate that latlon2.bin exists.
You can rename, move, or delete the existing file.
The size of the archive file latlon2.bin is about 1/3 the size
of latlon.dat. Also, the data do not have to be converted to
machine representation by applications. The main tradeoff in achieving
savings in space and access time is that although binary longs are
more portable than binary doubles or floats, any binary representation
is less portable than ASCII.
CAUTION: There may be a loss of precision when input data of
type double is converted to long.