[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?)
From: |
Nicola Pero |
Subject: |
Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?) |
Date: |
Mon, 2 Feb 2004 05:32:20 +0000 (GMT) |
> > I think a BOOL variable should take the values 0 for NO and 1 for YES.
> >
> > Coding standards should recommend that all code writing or returning a
> > BOOL always uses 0 for NO and 1 for YES, as everyone knows and agrees
> > on
> > those values and their meanings.
>
> OK, this time I checked ;-)
>
> http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/
> 5objc_language_summary/chapter_10_section_3.html#//apple_ref/doc/uid/
> 20001428/TPXREF102
>
> Why do you think that YES evaluates to "1"? This is a completely
> arbitary choice, YES could as well be defined like -1 or 5 or 100.
Ok. Then we could just say that a boolean should take the value YES or
NO. :-)
- Re: Re[2]: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), (continued)
- Re: Re[2]: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Helge Hess, 2004/02/02
- Re: Re[2]: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Marco Scheurer, 2004/02/02
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), David Ayers, 2004/02/02
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Pascal J . Bourguignon, 2004/02/02
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool:?), Alexander Malmberg, 2004/02/03
- Re: [RFA]: BOOL coding standards (Was: Problem with+numberWithBool: ?), Alexander Malmberg, 2004/02/02
- Re: Re[2]: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Pascal J . Bourguignon, 2004/02/02
- Re: [RFA]: BOOL coding standards (Was: Problem with+numberWithBool: ?), Alexander Malmberg, 2004/02/02
Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Helge Hess, 2004/02/01
Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Helge Hess, 2004/02/01
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?),
Nicola Pero <=