Article View: csu.cs.200
Article #211Assignment 5 bool?
From: donald johnson
Date: Sun, 22 Mar 1998 00:00
Date: Sun, 22 Mar 1998 00:00
29 lines
1595 bytes
1595 bytes
This is begining to bug me. The assignment states that we
should create functions that return type bool with values
of TRUE and FALSE. Well, apparently the CC compiler doesn't
know of type bool, so no problem if we create enum that
defines it, but... this might cause a conflict with a
complier that did have bool, the book implies that such a
complier would expect bool with lowercase values of true and
false (as opposed to all caps).
The book has sort of a way around this (APPENDIX E), which
still is going to conflict with assignment specs because it
uses lowercase true and false.
I have chosen to use a variation of Van's example in class
which used Bool with True, False. My variation uses Bool
with FALSE, TRUE - close to assignment, but not quite.
Am I missing something here, (often likely) or was the
assignment mis-printed (possible, I suppose).
Or... was this just an incidental part of the assignment
and any old kludge will do? -I doubt it, but worth a : )
--
Wayne Johnson : )
O O
o Life gets serious enough,
\___/ so lighten it up with a Smile!
Technical Details
Message-ID:
<6f3irg$3n90@yuma.ACNS.ColoState.EDU>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 127144,2d515ec67e52407 X-Google-Attributes: gid127144,public From: donald johnson <johnson@cs.colostate.edu> Subject: Assignment 5 bool? Date: 1998/03/22 Message-ID: <6f3irg$3n90@yuma.ACNS.ColoState.EDU> X-Deja-AN: 336575819 Organization: Colorado State University, Fort Collins, CO 80523 User-Agent: tin/pre-1.4-980226 (UNIX) (SunOS/5.5 (sun4c)) Newsgroups: csu.cs.200