[fpc-pascal] WORD (2 bytes) to String conversion

Vincent Snijders vsnijders at vodafonevast.nl
Fri Oct 23 22:06:46 CEST 2009


Graeme Geldenhuys schreef:
> On 23/10/2009, Jürgen Hestermann <juergen.hestermann at gmx.de> wrote:
>>  Wouldn't it be more direct to use
>>  Blockwrite(<file>,header.ID,sizeof(header.ID));
> 
> I read the complete header structure in one go (155 bytes). I simply
> want to output to a text file, a human readable structure of the
> complete INF file. The INF file format is quite complex and one can
> easily get confuse between various bits of information all in various
> locations inside the file.
> 
> The tool I am writing is imply so I can see in a more visual way the
> various bits of information, without the need for a hex editor etc...
> So the solution described earlier will suffice for my needs.
> 
> 

You can consider declaring the ID in the header record type as 
array[1..2] of char.

Vincent



More information about the fpc-pascal mailing list