"J. David Bryan" wrote:
On 12 Dec 2002 at 14:32, CBFalconer wrote:
"J. David Bryan" wrote:
... snip ...
I acknowledge that it is helpful to have foreign (e.g., C) semantics for interfacing. But is there any need for a general Boolean size, or only for "Boolean (8)", "Boolean (16)", etc.?
The standard way to create an array of 1 bit booleans is with 'packed'. i.e. "packed array [0..31] of boolean" could occupy one 32 bit word. No need for C bitfields.
Indeed. But "Boolean (32)" doesn't create 32 1-bit Booleans but rather a single 32-bit variable with roughly Boolean semantics ("roughly" meaning that 0 is FALSE and all other values are TRUE). There is no way to achieve that directly using "packed" and the standard Boolean type.
And there is no need for such an entity. A logical expression such as "X = 0" or "X <> 0" covers it quite nicely. It also avoids the eternal C confusion about what IS a logical expression.
It always annoys me that, in C, the preponderance of the evidence is true :-)