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

Jürgen Hestermann juergen.hestermann at gmx.de
Fri Oct 23 19:44:19 CEST 2009


> I would like my program to output the following:
> -----------------
> Header Section
>   header.ID    (5348h = "HS")
>   ...
> -----------------

Wouldn't it be more direct to use

Blockwrite(<file>,header.ID,sizeof(header.ID));

That would make it robust against changes of ID size and would avoid the 
many type castings.



More information about the fpc-pascal mailing list