boolean (was... never mind)
cepek at spanky.mgi.com
cepek at spanky.mgi.com
Thu May 31 11:15:50 AEST 1990
In article <4232 at castle.ed.ac.uk> aipdc at castle.ed.ac.uk (Paul D. Crowley)
writes:
>Peeve: why doesn't C have a type "boolean" built in? It seems natural,
>and I'm sure there's some compiler somewhere that could use it to
>improve executables.
Among our "company-common" .H files, the compiler/target-machine dependent
one includes the following pseudo-types:
#define bool int8 /* smallest entity for TRUE or FALSE */
#define boolean int /* fast/simple entity for TRUE or FALSE */
This allows the programmer to choose between space and speed. "int8"
represents the smallest, "reasonable accessable" datum size available
for this particular compiler/target-machine. "int" seems the logical
choice for boolean here, but perhaps on some machine somewhere a smaller
datum would be as easy/faster to use for the simple operations that
booleans are involved in.
+------------------------------------------------------------------------+
| Michael Cepek "Engage." |
| Programmer/Analyst |
| Internet: Cepek at MGI.COM |
| Management Graphics, Inc. Voice: +1 612/851-6112 |
| 1401 East 79th Street Operator: +1 612/854-1220 |
| Minneapolis, MN 55425 USA Fax: +1 612/854-6913 |
+------------------------------------------------------------------------+
More information about the Comp.std.c
mailing list