2000-02-28 16:30:00 +00:00
|
|
|
<?xml version="1.0"?>
|
2000-07-04 19:53:39 +00:00
|
|
|
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
|
2000-10-21 07:43:57 +00:00
|
|
|
<gsdoc base="NSNumber" prev="NSNull" next="NSNumberFormatter" up="Base">
|
2000-02-28 16:30:00 +00:00
|
|
|
<head>
|
|
|
|
<title>NSNumber</title>
|
|
|
|
<author name="Richard Frith-Macdonald">
|
|
|
|
<email address="rfm@gnu.org"/>
|
|
|
|
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
|
|
|
|
</author>
|
2001-03-03 09:58:53 +00:00
|
|
|
<version>$Revision$</version>
|
2001-03-03 09:56:29 +00:00
|
|
|
<date>$Date$</date>
|
2000-02-28 16:30:00 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<chapter>
|
|
|
|
<heading>NSNumber</heading>
|
|
|
|
<class name="NSNumber" super="NSValue">
|
|
|
|
<declared>Foundation/NSValue.h</declared>
|
|
|
|
<conform>NSCoding</conform>
|
2000-02-29 11:01:41 +00:00
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithBool:</sel>
|
|
|
|
<arg type="BOOL">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithChar:</sel>
|
|
|
|
<arg type="char">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithDouble:</sel>
|
|
|
|
<arg type="double">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithFloat:</sel>
|
|
|
|
<arg type="float">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithInt:</sel>
|
|
|
|
<arg type="int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithLong:</sel>
|
|
|
|
<arg type="long int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithLongLong:</sel>
|
|
|
|
<arg type="long long int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithShort:</sel>
|
|
|
|
<arg type="short int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithUnsignedChar:</sel>
|
|
|
|
<arg type="unsigned char">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithUnsignedInt:</sel>
|
|
|
|
<arg type="unsigned int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithUnsignedLong:</sel>
|
|
|
|
<arg type="unsigned long int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithUnsignedLongLong:</sel>
|
|
|
|
<arg type="unsigned long long int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSNumber*" factory="yes">
|
|
|
|
<sel>numberWithUnsignedShort:</sel>
|
|
|
|
<arg type="unsigned short int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="BOOL">
|
|
|
|
<sel>boolValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="char">
|
|
|
|
<sel>charValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSComparisonResult">
|
|
|
|
<sel>compare:</sel>
|
|
|
|
<arg type="NSNumber*">aNumber</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSDecimal">
|
|
|
|
<sel>decimalValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSString*">
|
|
|
|
<sel>description</sel>
|
|
|
|
<desc>
|
2001-11-12 13:01:09 +00:00
|
|
|
Invokes descriptionWithLocale: using nil locale.
|
2000-02-29 11:01:41 +00:00
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSString*">
|
|
|
|
<sel>descriptionWithLocale:</sel>
|
|
|
|
<arg type="NSDictionary*">aLocale</arg>
|
|
|
|
<desc>
|
2001-11-12 13:01:09 +00:00
|
|
|
<p>
|
|
|
|
Produces a string representation of the number. For a boolean
|
|
|
|
this will be either 'true' or 'false'. For other numbers the
|
|
|
|
format is produced using the initWithFormat:locale:... method
|
|
|
|
of NSString, and the format depends on the type of number as
|
|
|
|
follows -
|
|
|
|
</p>
|
|
|
|
<deflist>
|
|
|
|
<term>char</term>
|
|
|
|
<desc>%i</desc>
|
|
|
|
<term> short</term>
|
|
|
|
<desc>%hi</desc>
|
|
|
|
<term> int</term>
|
|
|
|
<desc>%i</desc>
|
|
|
|
<term> long</term>
|
|
|
|
<desc>%li</desc>
|
|
|
|
<term> long long</term>
|
|
|
|
<desc>%li</desc>
|
|
|
|
<term> unsigned char</term>
|
|
|
|
<desc>%u</desc>
|
|
|
|
<term> unsigned short</term>
|
|
|
|
<desc>%hu</desc>
|
|
|
|
<term> unsigned int</term>
|
|
|
|
<desc>%u</desc>
|
|
|
|
<term> unsigned long</term>
|
|
|
|
<desc>%lu</desc>
|
|
|
|
<term> unsigned long long</term>
|
|
|
|
<desc>%lu</desc>
|
|
|
|
<term> float</term>
|
|
|
|
<desc>%0.7g</desc>
|
|
|
|
<term> double</term>
|
|
|
|
<desc>%0.16g</desc>
|
|
|
|
</deflist>
|
2000-02-29 11:01:41 +00:00
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="double">
|
|
|
|
<sel>doubleValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="float">
|
|
|
|
<sel>floatValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithBool:</sel>
|
|
|
|
<arg type="BOOL">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithChar:</sel>
|
|
|
|
<arg type="char">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithDouble:</sel>
|
|
|
|
<arg type="double">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithFloat:</sel>
|
|
|
|
<arg type="float">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithInt:</sel>
|
|
|
|
<arg type="int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithLong:</sel>
|
|
|
|
<arg type="long int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithLongLong:</sel>
|
|
|
|
<arg type="long long int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithShort:</sel>
|
|
|
|
<arg type="short int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithUnsignedChar:</sel>
|
|
|
|
<arg type="unsigned char">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithUnsignedInt:</sel>
|
|
|
|
<arg type="unsigned int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithUnsignedLong:</sel>
|
2000-02-29 11:06:47 +00:00
|
|
|
<arg type="unsigned long int">value</arg>
|
2000-02-29 11:01:41 +00:00
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithUnsignedLongLong:</sel>
|
|
|
|
<arg type="unsigned long long int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="id">
|
|
|
|
<sel>initWithUnsignedShort:</sel>
|
|
|
|
<arg type="unsigned short int">value</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="int">
|
|
|
|
<sel>intValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="BOOL">
|
|
|
|
<sel>isEqualToNumber:</sel>
|
|
|
|
<arg type="NSNumber*">aNumber</arg>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="long long int">
|
|
|
|
<sel>longLongValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="long int">
|
|
|
|
<sel>longValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="short int">
|
|
|
|
<sel>shortValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="NSString*">
|
|
|
|
<sel>stringValue</sel>
|
|
|
|
<desc>
|
2001-11-12 13:01:09 +00:00
|
|
|
Expivalent to descriptionWithLocale: using a nil locale.
|
2000-02-29 11:01:41 +00:00
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="unsigned char">
|
|
|
|
<sel>unsignedCharValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="unsigned int">
|
|
|
|
<sel>unsignedIntValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="unsigned long long int">
|
|
|
|
<sel>unsignedLongLongValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="unsigned long int">
|
|
|
|
<sel>unsignedLongValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
<method type="unsigned short int">
|
|
|
|
<sel>unsignedShortValue</sel>
|
|
|
|
<desc>
|
|
|
|
</desc>
|
2000-02-28 18:30:41 +00:00
|
|
|
</method>
|
2000-02-28 16:30:00 +00:00
|
|
|
</class>
|
|
|
|
</chapter>
|
|
|
|
</body>
|
|
|
|
</gsdoc>
|