• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Variable type representations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Variable type representations
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Can't generate receipt OS X after 173 exit
  • Next by Date: Re: Variable type representations
  • Previous by thread: Re: Automatically restore last saved document on application launch
  • Next by thread: Re: Variable type representations
  • Index(es):
    • Date
    • Thread