Markus Gerwinski wrote:
Frank Heckenbach wrote:
... snip ...
I also made up a C header containing this declaration:
typedef enum { gpc_false, gpc_true } gpc_bool;
for compatibility. Is this one a valid mapping, or would you rather recommend me another one?
typedef unsigned char Boolean;
In Pascal a Boolean has the enumerated values false, true. The standards specify that the ord(false) is 0, which forces ord(true) to be one. A boolean is not compatible with an integer, but the ord of a boolean is an integral type. There is no guarantee as to how much storage is used by a boolean, that is up to the implementor. The common choices are byte and integer. A PACKED ARRAY OF boolean _may_ only use one bit per item.