Re: Adding a column to an existing output file



On Wed, 31 Oct 2007 11:48:27 -0000, csocean <csocean@xxxxxxxxx>
wrote in <1193831307.716077.14500@xxxxxxxxxxxxxxxxxxxxxxxxxxx>:

Does anyone know if there's a way to use APPEND (or something similar)
to add a column to an output file, rather than adding rows at the
end? I need it to grow sideways rather than downwards.

No, due to the way text files are laid out on disk. There's
no way to deserialise[1] it the way you want. You may be able to add fields
to a database file or an Excel spread*** by writing to the end of the
file, but that's a whole new can of worms.

With languages such as Fortran you're basically stuck with reading
the file line-by-line and writing that and the additional data out to
another file.

[1] Maybe more properly "reserialise"

--
Ivan Reid, School of Engineering & Design, _____________ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
.


Quantcast