gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?)


From: Kazunobu Kuriyama
Subject: Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?)
Date: Sat, 31 Jan 2004 02:19:54 +0900
User-agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1

Alexander Malmberg wrote:
<snip>

+BOOL values are normal c truth values. Any non-zero value (i.e. any value
+not equal to NO) is true. Thus, BOOL values must never be compared against
+YES since this doesn't correctly handle true values other than YES.

I'd prefer
   Any non-zero value (i.e. any value not equal to NO) is *evaluated* to
be true if necessary (e.g. evaluation of expressions involving relational
   or logical (AND|OR|NEGATION) operators, or conditional ones
   in IF, WHILE, SWITCH, or FOR statements).
to
   Any non-zero value (i.e. any value not equal to NO) is true.

Perhaps, there's room for improving English of the sentences.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]