blob: b4a5ff918a5646df2c5209b8d9902fd18ac20c02 [file] [log] [blame]
// Written in the D programming language.
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.
<b>stdint</b> offers a portable way of trading off size
vs efficiency, in a manner compatible with the <tt>stdint.h</tt>
definitions in C.
In the table below, the $(B exact alias)es are types of exactly the
specified number of bits.
The $(B at least alias)es are at least the specified number of bits
large, and can be larger.
The $(B fast alias)es are the fastest integral type supported by the
processor that is at least as wide as the specified number of bits.
The aliases are:
$(TH Exact Alias)
$(TH Description)
$(TH At Least Alias)
$(TH Description)
$(TH Fast Alias)
$(TH Description)
$(TD int8_t)
$(TD exactly 8 bits signed)
$(TD int_least8_t)
$(TD at least 8 bits signed)
$(TD int_fast8_t)
$(TD fast 8 bits signed)
$(TD uint8_t)
$(TD exactly 8 bits unsigned)
$(TD uint_least8_t)
$(TD at least 8 bits unsigned)
$(TD uint_fast8_t)
$(TD fast 8 bits unsigned)
$(TD int16_t)
$(TD exactly 16 bits signed)
$(TD int_least16_t)
$(TD at least 16 bits signed)
$(TD int_fast16_t)
$(TD fast 16 bits signed)
$(TD uint16_t)
$(TD exactly 16 bits unsigned)
$(TD uint_least16_t)
$(TD at least 16 bits unsigned)
$(TD uint_fast16_t)
$(TD fast 16 bits unsigned)
$(TD int32_t)
$(TD exactly 32 bits signed)
$(TD int_least32_t)
$(TD at least 32 bits signed)
$(TD int_fast32_t)
$(TD fast 32 bits signed)
$(TD uint32_t)
$(TD exactly 32 bits unsigned)
$(TD uint_least32_t)
$(TD at least 32 bits unsigned)
$(TD uint_fast32_t)
$(TD fast 32 bits unsigned)
$(TD int64_t)
$(TD exactly 64 bits signed)
$(TD int_least64_t)
$(TD at least 64 bits signed)
$(TD int_fast64_t)
$(TD fast 64 bits signed)
$(TD uint64_t)
$(TD exactly 64 bits unsigned)
$(TD uint_least64_t)
$(TD at least 64 bits unsigned)
$(TD uint_fast64_t)
$(TD fast 64 bits unsigned)
The ptr aliases are integral types guaranteed to be large enough
to hold a pointer without losing bits:
$(TH Alias)
$(TH Description)
$(TD intptr_t)
$(TD signed integral type large enough to hold a pointer)
$(TD uintptr_t)
$(TD unsigned integral type large enough to hold a pointer)
The max aliases are the largest integral types:
$(TH Alias)
$(TH Description)
$(TD intmax_t)
$(TD the largest signed integral type)
$(TD uintmax_t)
$(TD the largest unsigned integral type)
* Macros:
* ATABLE=<table border="1" cellspacing="0" cellpadding="5">$0</table>
* Copyright: Copyright Digital Mars 2000 - 2009.
* License: $(HTTP, Boost License 1.0).
* Authors: $(HTTP, Walter Bright)
* Source: $(PHOBOSSRC std/_stdint.d)
/* Copyright Digital Mars 2000 - 2009.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
module std.stdint;
public import core.stdc.stdint;