Variable type representations
Variable type representations
- Subject: Variable type representations
- From: Carl Hoefs <email@hidden>
- Date: Fri, 11 Mar 2016 13:43:01 -0700
On x86_64 OS X systems, ObjC variable type 'long' uses an 8-byte representation, whereas 'int' uses 4 bytes. I'm converting NSStrings to values, but it has no 'longValue' method or property. According to the documentation, NSString supports:
doubleValue - 8 bytes
floatValue - 4 bytes
intValue - 4 bytes
integerValue - 8 bytes
longLongValue - 8 bytes
boolValue - 1 byte
Q1: How can 'long' and 'long long' have the same 8-byte representation?
Q2: How to get an unsigned long int value from an NSString? Use NSInteger?
-Carl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden