objective c 데이터 형

iOS 2015. 7. 7. 22:39


데이터 형 

상수 예 

NSLog 포멧 문자 

 char

 'a', '\n' 

 %c 

 short int 

 --

 %hi, %hx, %ho 

 unsigned short int

 -- 

 %hu, %hx, %ho 

 int

 12, -97, 0xFFE0, 0177 

 %i, %x, %o 

 unsigned int

 12u, 100U, 0XFFu

 %u, %x, %o 

 long int

 12L, -2001, 0xffffL 

 %li, %lx, %lo 

 unsigned long int

 12UL, 100ul, oxffeeUL 

 %lu, %lx %lo 

 Float

 12.34f, 3.1e-5f, 0x1.5p10, 0x1P-1

 %f, %e, %g, %a 

 Double

 12.34, 1.3e-5, 0x.1p3

 %f, %e, %g, %a  

 long double 12.34L, 3.1e-5l

 %Lf, %Le, %Lg

 id nil  %p 


: