Binary files.

Mon, 7 Apr 1997 14:20:49 +0200 (SAT)


Hi

Sorry if this was handled in a FAQ, but I haven't found it.

I'd like to read bytes from a file, so I looked at some of the examples.
I found an assign(file of byte...).  Cool.  It doesn't seem to
work to great tho... How big does it read?  Are you sure its just 1 byte?
How big is a byte anyway? Looking at the examples and the info file,
I get confused.  Is an integer 16bit or 32bit?  What happens with
type byte=0..255;  I tried defining them like in the info file (using
__short__, etc.) but it doesn't compile.  When I use the example's stuff
it does compile.

Hmmm... I am converting some stuff from borland, and some from fpk,
so I would like to know how to get 8, 16 and 32 bit signed and unsinged
integers.  I don't mind doing a search/replace on the source, but I do
need to know how big each thing is.

AND how to apply them properly to files ;)

Cheers
Berend.



Berend De Schouwer (bdeschou@voyager.cs.wits.ac.za)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es