Extended Integer Types: __int8, __int16, __int32, __int64

From Appmethod Topics
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


Category

Keyword Extensions

Description

You can specify the size for integer types (number of bits occupied in memory).

You must use the appropriate suffix (i16, ui32, and so on) using extended integer constants.

Extended integer types

Type Suffix

in
constants

Example Storage

__int8

i8

     __int8 c = 127i8;

8 bits

unsigned __int8

ui8

     unsigned __int8 c = 240ui8;

8 bits

__int16

i16

     __int16 s = 32767i16;

16 bits

unsigned __int16

ui16

     unsigned __int16 s = 64532ui16;

16 bits

__int32

i32

     __int32 i = 123456789i32;

32 bits

unsigned __int32

ui32

     unsigned __int32 i = 223456789ui32;

32 bits

__int64

i64

     __int64 big = 12345654321i64;

64 bits

unsigned __int64

ui64

     unsigned __int64 hugeInt = 1234567887654321ui64;

64 bits

See Also