diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-26 13:20:51 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-26 13:20:51 +0200 |
commit | 638cb2d084ea9ddfc01ecf03603ab910dfe59d89 (patch) | |
tree | c107dfedda049f886fac2de5b52c7c99de707627 /Lisp/init.lisp | |
parent | eae07aa1068527038ccc7457b00962665d3bd721 (diff) |
Update documentation.
darcs-hash:32d8156e02effa3d43909670add8ac0701acba62
Diffstat (limited to 'Lisp/init.lisp')
-rw-r--r-- | Lisp/init.lisp | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/Lisp/init.lisp b/Lisp/init.lisp index 94c87a1..a290a8d 100644 --- a/Lisp/init.lisp +++ b/Lisp/init.lisp @@ -35,3 +35,110 @@ ((:gnu) 'objcl-features:gnu-runtime) ((:next) 'objcl-features:next-runtime)) *features*)) + + +(setf (documentation '+nil+ 'variable) + "The Objective-C constant value `nil`. + +## Value Type: + +an **object** of type __id__. + + +## Description: + +__+nil+__ is the constant corresponding to the Objective-C `nil` value. + +__+nil+__ is not a value that any method invocation should return. +Whenever `nil` is returned by an Objective-C invocation, It is the job +of Objective-CL to convert it to __nil__. Similarly, __null__ arguments +are converted to `nil` automatically. Still, there may be occasions in +which it is useful to have `nil` as an __id__ instance. Therefore, it +is provided here. + +Note that, in the general case, `nil` is not necessarily equal to +`NULL`.") + + +(setf (documentation '+yes+ 'variable) + "The Objective-C boolean value `YES`. + +## Value Type: + +a **number**. + + +## Description: + +__+yes+__ is the constant corresponding to the Objective-C `YES` 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 **constant**s 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: + + __+no+__") + + +(setf (documentation '+no+ 'variable) + "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 **constant**s 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+__")
\ No newline at end of file |