Skip to content

Instantly share code, notes, and snippets.

@ksm
Created September 10, 2012 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ksm/3689585 to your computer and use it in GitHub Desktop.
Save ksm/3689585 to your computer and use it in GitHub Desktop.
NSNumber literals with types
NSNumber *value;
value = @'X'; // char
value = @12345 // int
value = @12345ul // unsigned long
value = @12345ll // long long
value = @123.45f // float
value = @123.45 // double
value = @YES // BOOL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment