Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site cbmvax.cbmvax.cbm.UUCP Path: utzoo!watmath!clyde!cbosgd!ukma!psuvm.bitnet!psuvax1!vu-vlsi!cbmvax!higgin From: higgin@cbmvax.cbm.UUCP (Paul Higginbottom) Newsgroups: net.micro.amiga Subject: Re: Followup: Aztec - good, bad, help. Message-ID: <312@cbmvax.cbmvax.cbm.UUCP> Date: Sat, 31-May-86 18:29:48 EDT Article-I.D.: cbmvax.312 Posted: Sat May 31 18:29:48 1986 Date-Received: Mon, 2-Jun-86 16:43:01 EDT References: <296@bucsb.bu.edu.UUCP> Reply-To: higgin@cbmvax.UUCP (Paul Higginbottom) Organization: Commodore Technology, West Chester, PA Lines: 46 In article <296@bucsb.bu.edu.UUCP> jdt@bucsb.bu.edu.UUCP (Dave Tenny) writes: > 2.) Beware playing around with BOOL objects. I never proved to > my satisfaction that this was causing problems, but the following > suspicious situation exists: > > in exec/types.h: > typedef short BOOL ; > #define TRUE 1L > #define FALSE 0L >... > >Good job Aztec! > > Jeffrey D. Tenny Yes, Jeffrey, your suspicion was warranted. The following will cause a problem: doit(5, TRUE); . . } doit(count, flag) int count; BOOL flag; { ... } Since BOOL is a short (i.e., 16 bits unless +l is specified under the compiler) but the constant TRUE or FALSE is long (32 bits), 'flag' will ALWAYS be zero in doit(). Aztec, arguably should have seen this and made BOOL typedef'ed to long, but Amiga is partially at fault, because they've been trying to make SHORT's go away and replace them with WORD to make life easier, and if this had been done, this problem would not have arisen. Hope this helps. Regards, Paul Higginbottom Disclaimer: I do not work for Commodore, and my opinions are at least my own. FLAME Also, I won't be on here for much longer (sniff), because Commodore views "outsiders" using their vax to post to read news as a security threat! I guess they don't need help on here either.