Article View: comp.std.c
Article #1343Re: boolean (was... never mind)
From: cepek
Date: Thu, 31 May 1990 01:15
Date: Thu, 31 May 1990 01:15
28 lines
1978 bytes
1978 bytes
In article <4232@castle.ed.ac.uk> aipdc@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@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 | +------------------------------------------------------------------------+
Technical Details
Message-ID:
<20.266429f6@spanky.mgi.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!nic.MR.NET!vixvax.mgi.com!spanky.mgi.com!cepekReferences:
<12986@smoke.BRL.MIL> <5907@buengc.BU.EDU> <4232@castle.ed.ac.uk> <13003@smoke.BRL.MIL>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!nic.MR.NET!vixvax.mgi.com!spanky.mgi.com!cepek From: cepek@spanky.mgi.com Newsgroups: comp.std.c Subject: Re: boolean (was... never mind) Summary: small vs fast booleans Message-ID: <20.266429f6@spanky.mgi.com> Date: 31 May 90 01:15:50 GMT References: <12986@smoke.BRL.MIL> <5907@buengc.BU.EDU> <4232@castle.ed.ac.uk> <13003@smoke.BRL.MIL> Reply-To: Cepek@MGI.COM Organization: Management Graphics, Inc. Lines: 28