home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!kirk!ptcburp!michi
- From: michi@ptcburp.ptcbu.oz.au (Michael Henning)
- Subject: Re: How to use 'return' in c?
- Message-ID: <1992Nov10.035834.14396@ptcburp.ptcbu.oz.au>
- Organization: Pyramid Technology Corporation
- References: <1992Nov7.122126.24409@druid.uucp> <gm5XTB3w165w@quest.UUCP>
- Date: Tue, 10 Nov 1992 03:58:34 GMT
- Lines: 26
-
- kdq@quest.UUCP (Kevin D. Quitt) writes:
-
- > On the other hand, since C does not truly support the boolean type,
- >I consider it misleading to assign a numeric value to a boolean. I
- >define TRUE as (1==1) because the result of this is a boolean - the
- >fact that it is represented by a numerical value is misleading.
-
- No. To be *really* sure you have to use
-
- #define TRUE (atoi("1") == atoi("1"))
-
- This is to make sure that the symbolic names and the underlying
- representation (2's complement vs 1's complement) are clearly separated.
- This enhances portability and makes the code easier to maintain.
-
-
- Michi,
-
- with a :-) for the humour impared.
-
- PS: Kevin, a look at the FAQ would have helped to prevent your posting.
- --
- -m------- Michael Henning +61 75 950255
- ---mmm----- Pyramid Technology +61 75 722475 FAX
- -----mmmmm--- Research Park, Bond University michi@ptcburp.ptcbu.oz.au
- -------mmmmmmm- Gold Coast, Q 4229, AUSTRALIA uunet!munnari!ptcburp.oz!michi
-