2
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
3
<gsdoc base="NSNumber" prev="NSNull" next="NSNumberFormatter" up="Base">
5
<title>NSNumber</title>
6
<author name="Richard Frith-Macdonald">
7
<email address="rfm@gnu.org"/>
8
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
10
<version>$Revision: 1.10 $</version>
11
<date>$Date: 2001/11/12 13:01:09 $</date>
15
<heading>NSNumber</heading>
16
<class name="NSNumber" super="NSValue">
17
<declared>Foundation/NSValue.h</declared>
18
<conform>NSCoding</conform>
21
<method type="NSNumber*" factory="yes">
22
<sel>numberWithBool:</sel>
23
<arg type="BOOL">value</arg>
27
<method type="NSNumber*" factory="yes">
28
<sel>numberWithChar:</sel>
29
<arg type="char">value</arg>
33
<method type="NSNumber*" factory="yes">
34
<sel>numberWithDouble:</sel>
35
<arg type="double">value</arg>
39
<method type="NSNumber*" factory="yes">
40
<sel>numberWithFloat:</sel>
41
<arg type="float">value</arg>
45
<method type="NSNumber*" factory="yes">
46
<sel>numberWithInt:</sel>
47
<arg type="int">value</arg>
51
<method type="NSNumber*" factory="yes">
52
<sel>numberWithLong:</sel>
53
<arg type="long int">value</arg>
57
<method type="NSNumber*" factory="yes">
58
<sel>numberWithLongLong:</sel>
59
<arg type="long long int">value</arg>
63
<method type="NSNumber*" factory="yes">
64
<sel>numberWithShort:</sel>
65
<arg type="short int">value</arg>
69
<method type="NSNumber*" factory="yes">
70
<sel>numberWithUnsignedChar:</sel>
71
<arg type="unsigned char">value</arg>
75
<method type="NSNumber*" factory="yes">
76
<sel>numberWithUnsignedInt:</sel>
77
<arg type="unsigned int">value</arg>
81
<method type="NSNumber*" factory="yes">
82
<sel>numberWithUnsignedLong:</sel>
83
<arg type="unsigned long int">value</arg>
87
<method type="NSNumber*" factory="yes">
88
<sel>numberWithUnsignedLongLong:</sel>
89
<arg type="unsigned long long int">value</arg>
93
<method type="NSNumber*" factory="yes">
94
<sel>numberWithUnsignedShort:</sel>
95
<arg type="unsigned short int">value</arg>
109
<method type="NSComparisonResult">
111
<arg type="NSNumber*">aNumber</arg>
115
<method type="NSDecimal">
116
<sel>decimalValue</sel>
120
<method type="NSString*">
121
<sel>description</sel>
123
Invokes descriptionWithLocale: using nil locale.
126
<method type="NSString*">
127
<sel>descriptionWithLocale:</sel>
128
<arg type="NSDictionary*">aLocale</arg>
131
Produces a string representation of the number. For a boolean
132
this will be either 'true' or 'false'. For other numbers the
133
format is produced using the initWithFormat:locale:... method
134
of NSString, and the format depends on the type of number as
146
<term> long long</term>
148
<term> unsigned char</term>
150
<term> unsigned short</term>
152
<term> unsigned int</term>
154
<term> unsigned long</term>
156
<term> unsigned long long</term>
165
<method type="double">
166
<sel>doubleValue</sel>
170
<method type="float">
171
<sel>floatValue</sel>
176
<sel>initWithBool:</sel>
177
<arg type="BOOL">value</arg>
182
<sel>initWithChar:</sel>
183
<arg type="char">value</arg>
188
<sel>initWithDouble:</sel>
189
<arg type="double">value</arg>
194
<sel>initWithFloat:</sel>
195
<arg type="float">value</arg>
200
<sel>initWithInt:</sel>
201
<arg type="int">value</arg>
206
<sel>initWithLong:</sel>
207
<arg type="long int">value</arg>
212
<sel>initWithLongLong:</sel>
213
<arg type="long long int">value</arg>
218
<sel>initWithShort:</sel>
219
<arg type="short int">value</arg>
224
<sel>initWithUnsignedChar:</sel>
225
<arg type="unsigned char">value</arg>
230
<sel>initWithUnsignedInt:</sel>
231
<arg type="unsigned int">value</arg>
236
<sel>initWithUnsignedLong:</sel>
237
<arg type="unsigned long int">value</arg>
242
<sel>initWithUnsignedLongLong:</sel>
243
<arg type="unsigned long long int">value</arg>
248
<sel>initWithUnsignedShort:</sel>
249
<arg type="unsigned short int">value</arg>
259
<sel>isEqualToNumber:</sel>
260
<arg type="NSNumber*">aNumber</arg>
264
<method type="long long int">
265
<sel>longLongValue</sel>
269
<method type="long int">
274
<method type="short int">
275
<sel>shortValue</sel>
279
<method type="NSString*">
280
<sel>stringValue</sel>
282
Expivalent to descriptionWithLocale: using a nil locale.
285
<method type="unsigned char">
286
<sel>unsignedCharValue</sel>
290
<method type="unsigned int">
291
<sel>unsignedIntValue</sel>
295
<method type="unsigned long long int">
296
<sel>unsignedLongLongValue</sel>
300
<method type="unsigned long int">
301
<sel>unsignedLongValue</sel>
305
<method type="unsigned short int">
306
<sel>unsignedShortValue</sel>