Catherine Moroney wrote:
> Portability is not an issue here as the code in question is only going
> to be run on a single platform (SGI Origin).
The name of this statement "Famous last words." The name of what this
statement is called is "That's what they all say."
HDF is supposed to be a portable data format. I have no trouble using it
to share numeric data between Sun, SGI and PC/Linux platforms. I couldn't
find anything in my HDF manuals, however, about the "HDF standard"
representation for new-lines embedded in character strings.
If there is a specification that I didn't find, portability isn't an issue
for Catherine -- no matter what platform her code ends up on next year.
Otherwise, the issue is what the designers of the HDF file specified she
ought to do. My scientific wild-ass guess (SWAG) is that they haven't
given any thought to this detail, or to its portability and mixed-language
programming implications -- "just put \n where you want line-breaks" is a
perfectly good C specification, but this disregards that much
computationally intensive data analysis is done using Fortran.
In the present draft of the Fortran 2000 standard, ACHAR(10) is specified
to cause a new-line when output using stream access. But stream access
isn't available for internal files.
--
What fraction of Americans believe | Van Snyder
Wrestling is real and NASA is fake? | [log in to unmask]
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Dan Goldin, George Bush, the Pope, or anybody else.
|