Limits

System limits for various types can be found in limit.h.

  @import <limits.h>
  // ...
  NSLog(@"CHAR_MIN:   %c",   CHAR_MIN);
  NSLog(@"CHAR_MAX:   %c",   CHAR_MAX);
  NSLog(@"SHRT_MIN:   %hi",  SHRT_MIN);    // signed short int
  NSLog(@"SHRT_MAX:   %hi",  SHRT_MAX);
  NSLog(@"INT_MIN:    %i",   INT_MIN);
  NSLog(@"INT_MAX:    %i",   INT_MAX);
  NSLog(@"LONG_MIN:   %li",  LONG_MIN);    // signed long int
  NSLog(@"LONG_MAX:   %li",  LONG_MAX);
  NSLog(@"ULONG_MIN not defined, it's always zero: %lu", 0);  
  NSLog(@"ULONG_MAX:  %lu",  ULONG_MAX);   // unsigned long int
  NSLog(@"LLONG_MIN:  %lli", LLONG_MIN);   // signed long long int
  NSLog(@"LLONG_MAX:  %lli", LLONG_MAX);
  NSLog(@"ULLONG_MIN not defined, it's always zero: %llu", 0);  
  NSLog(@"ULLONG_MAX: %llu", ULLONG_MAX);  // unsigned long long int

Native Types

char

  'a', '\n'

double

double is guaranteed to be at least 64-bit. All numeric constants are by default assumed to be a double unless
specified with either am f or F.

  12.31  // minimum 64-bit double 
  12.31f // minimum 32-bit float
  12.31F // minimum 32-bit float

NSLog Formats