www.digitalmars.com Home | Search | D | Comments
Last update Sat Mar 18 23:51:29 2006
D
Language
Phobos
Comparisons


object

std
 std.base64
 std.boxer
 std.compiler
 std.conv
 std.cover
 std.ctype
 std.date
 std.demangle
 std.file
 std.format
 std.gc
 std.intrinsic
 std.math
 std.md5
 std.mmfile
 std.openrj
 std.outbuffer
 std.path
 std.process
 std.random
 std.recls
 std.regexp
 std.socket
 std.socketstream
 std.stdint
 std.stdio
 std.cstream
 std.stream
 std.string
 std.system
 std.thread
 std.uri
 std.utf
 std.zip
 std.zlib
 std.c.fenv
 std.c.math
 std.c.process
 std.c.stdarg
 std.c.stddef
 std.c.stdio
 std.c.stdlib
 std.c.string
 std.c.time
 std.c.wcharh
 std.windows.charset

std.windows

std.linux

std.c.windows

std.c.linux

std.stdint

D constrains integral types to specific sizes. But efficiency of different sizes varies from machine to machine, pointer sizes vary, and the maximum integer size varies. stdint offers a portable way of trading off size vs efficiency, in a manner compatible with the stdint.h definitions in C.

The exact aliases are types of exactly the specified number of bits. The at least aliases are at least the specified number of bits large, and can be larger. The fast aliases are the fastest integral type supported by the processor that is at least as wide as the specified number of bits.

The aliases are:

Exact Alias Description At Least Alias Description Fast Alias Description
int8_t exactly 8 bits signed int_least8_t at least 8 bits signed int_fast8_t fast 8 bits signed
uint8_t exactly 8 bits unsigned uint_least8_t at least 8 bits unsigned uint_fast8_t fast 8 bits unsigned

int16_t exactly 16 bits signed int_least16_t at least 16 bits signed int_fast16_t fast 16 bits signed
uint16_t exactly 16 bits unsigned uint_least16_t at least 16 bits unsigned uint_fast16_t fast 16 bits unsigned

int32_t exactly 32 bits signed int_least32_t at least 32 bits signed int_fast32_t fast 32 bits signed
uint32_t exactly 32 bits unsigned uint_least32_t at least 32 bits unsigned uint_fast32_t fast 32 bits unsigned

int64_t exactly 64 bits signed int_least64_t at least 64 bits signed int_fast64_t fast 64 bits signed
uint64_t exactly 64 bits unsigned uint_least64_t at least 64 bits unsigned uint_fast64_t fast 64 bits unsigned


The ptr aliases are integral types guaranteed to be large enough to hold a pointer without losing bits:

Alias Description
intptr_t signed integral type large enough to hold a pointer
uintptr_t unsigned integral type large enough to hold a pointer


The max aliases are the largest integral types:

Alias Description
intmax_t the largest signed integral type
uintmax_t the largest unsigned integral type


Authors:
Walter Bright, www.digitalmars.com

License:
Public Domain