Difference between revisions of "C Types"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
|-
 
|-
 
! name !! printf format !! Win32 size !! ILP32 size !! LP64 Size !! LLP64 Size !!
 
! name !! printf format !! Win32 size !! ILP32 size !! LP64 Size !! LLP64 Size !!
 +
|-
 +
! char
 +
|| "hhd" || 8 || 8 || 8 || 8 ||
 
|-
 
|-
 
! short
 
! short
|| hd || 16 || 16 || 16 || 16 ||
+
|| "hd" || 16 || 16 || 16 || 16 ||
 
|-
 
|-
 
!int  
 
!int  
|| d || 32 || 32 || 32 || 32 ||
+
|| "d" || 32 || 32 || 32 || 32 ||
 
|-
 
|-
 
! long
 
! long
|| ld || 32 || 32 || 64 || 32 ||
+
|| "ld" || 32 || 32 || 64 || 32 ||
 
|-
 
|-
 
! int8_t  
 
! int8_t  
|| "PRId8" || 8 || 8 || 8 || 8 ||  
+
|| PRId8 || 8 || 8 || 8 || 8 ||  
 
|-
 
|-
 
! int16_t   
 
! int16_t   
|| "PRId16" || 16 || 16 || 16 || 16 ||
+
|| PRId16 || 16 || 16 || 16 || 16 ||
 
|-
 
|-
 
! int32_t  
 
! int32_t  
|| "PRId32" || 32 || 32 || 32 || 32 ||  
+
|| PRId32 || 32 || 32 || 32 || 32 ||  
 
|-
 
|-
 
! int64_t  
 
! int64_t  
|| "PRId64" || 64 || 64 || 64 || 64 ||
+
|| PRId64 || 64 || 64 || 64 || 64 ||
 
|-
 
|-
 
! unsigned short  
 
! unsigned short  
|| hu || 16  || 16 || 16 || 16 ||
+
|| "hu" || 16  || 16 || 16 || 16 ||
 
|-
 
|-
 
! unsigned  
 
! unsigned  
Line 32: Line 35:
 
|-
 
|-
 
! unsigned long  
 
! unsigned long  
|| lu || 32 || 32 || 64 || 32 ||
+
|| "lu" || 32 || 32 || 64 || 32 ||
 
|-
 
|-
 
! uint8_t  
 
! uint8_t  
|| "PRIu8" || 8 || 8 || 8 || 8 ||
+
|| PRIu8 || 8 || 8 || 8 || 8 ||
 
|-
 
|-
 
! uint16_t  
 
! uint16_t  
|| "PRIu16" || 16 || 16 || 16 || 16 ||
+
|| PRIu16 || 16 || 16 || 16 || 16 ||
 
|-
 
|-
 
! uint32_t  
 
! uint32_t  
|| "PRIu32" || 32 || 32 || 32 || 32 ||
+
|| PRIu32 || 32 || 32 || 32 || 32 ||
 
|-
 
|-
 
! uint64_t  
 
! uint64_t  
|| "PRIu64" || 64 || 64 || 64 || 64 ||
+
|| PRIu64 || 64 || 64 || 64 || 64 ||
 
|}
 
|}
  
  
 
[[Category:Coding]]
 
[[Category:Coding]]

Revision as of 11:45, 16 October 2011

C Types
name printf format Win32 size ILP32 size LP64 Size LLP64 Size
char "hhd" 8 8 8 8
short "hd" 16 16 16 16
int "d" 32 32 32 32
long "ld" 32 32 64 32
int8_t PRId8 8 8 8 8
int16_t PRId16 16 16 16 16
int32_t PRId32 32 32 32 32
int64_t PRId64 64 64 64 64
unsigned short "hu" 16 16 16 16
unsigned u 32 32 32 32
unsigned long "lu" 32 32 64 32
uint8_t PRIu8 8 8 8 8
uint16_t PRIu16 16 16 16 16
uint32_t PRIu32 32 32 32 32
uint64_t PRIu64 64 64 64 64