Contents (package MULK.OBJECTIVE-CL)


Constant Variable +NO+

Summary:

The Objective-C boolean value NO.

Value Type:

a number.

Description:

+no+ is the constant corresponding to the Objective-C NO value.

As there is no way to distinguish methods that return booleans from those that return numbers in the Objective-C runtime, all invocations that ought to return booleans will actually return one of two compile-time Objective-C constants: either YES or NO. Lisp code using Objective-CL needs to be aware of this and test return values accordingly. For this to be possible, two constants are defined on the Lisp side, analogously to Objective-C. These are called +yes+ and +no+.

Examples:

(invoke (find-class 'ns-string)  
        :is-subclass-of-class (find-class 'ns-object))  
 ;=> #.YES  
  
(invoke (find-class 'ns-object)  
        :is-subclass-of-class (find-class 'ns-object))  
 ;=> #.YES  
  
(invoke (find-class 'ns-object)  
        :is-subclass-of-class (find-class 'ns-string))  
 ;=> #.NO  
 

See Also:

+yes+