🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: csu.cs.200
Article #210

Re: Assignment 5 bool?

#210
From: Xylen
Date: Sun, 22 Mar 1998 00:00
34 lines
1749 bytes
donald johnson wrote in message <6f3irg$3n90@yuma.ACNS.ColoState.EDU>...
>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 : )


I used the following, and it works just fine, so maybe any old Kludge will
work.  :)

#define bool int
#define false 0
#define true 1

Mary
Technical Details
Message-ID: <6f3jfu$44u6@yuma.ACNS.ColoState.EDU>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6f3irg$3n90@yuma.ACNS.ColoState.EDU>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 127144,2d515ec67e52407,start
X-Google-Attributes: gid127144,public
From: "Xylen" <mctupper@holly.colostate.edu>
Subject: Re: Assignment 5 bool?
Date: 1998/03/22
Message-ID: <6f3jfu$44u6@yuma.ACNS.ColoState.EDU>
X-Deja-AN: 336575818
References: <6f3irg$3n90@yuma.ACNS.ColoState.EDU>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Colorado State University, Fort Collins, CO  80523
Newsgroups: csu.cs.200