[m-rev.] for review: extend coverage of builtin types in the reference manual

Julien Fischer jfischer at opturion.com
Tue Sep 18 15:43:10 AEST 2018


Hi Peter,

On Mon, 17 Sep 2018, Peter Wang wrote:

>> + at node Signed integer types
>> + at subsubsection Signed integer types
>> +There are five primitive signed integer types: @code{int}, @code{int8},
>> + at code{int16}, @code{int32} and @code{int64}.
>> +
>> +Except for @code{int}, the width of each of these is given by the numeric
>> +suffix in its name.
>> +
>> +The width of @code{int} is implementation defined, but must be at least 32-bits
>> +and must be equal to the width of the type @code{uint}.
>> +
>> +All signed integer types use two's-complement representation.
>> +
>> +Values of the type @code{int8} must be in the range @math{-128} to @math{127},
>> +inclusive.
>> +
>> +Values of the type @code{int16} must be in the range @math{-32768} to @math{32767},
>> +inclusive.
>> +
>> +Values of the type @code{int32} must be in the range @math{-2147483648} to
>> + at math{2147483647}, inclusive.
>> +
>> +Values of the type @code{int64} must be in the range @math{-9223372036854775808}
>> +to @math{9223372036854775807}, inclusive.
>> +
>> +Values of the type @code{int} must be in the range to @math{-(2^{N - 1})} to
>> + at math{2^{N - 1} - 1}, inclusive; @math{N} being the width of @code{int}.
>> +
>
> in bits

Done.

>> + at node Unsigned integer types
>> + at subsubsection Unsigned integer types
>> +There are five primitive unsigned integer types: @code{uint}, @code{uint8},
>> + at code{uint16}, @code{uint32} and @code{uint64}.
>> +
>> +Except for @code{uint}, the width of each of these types is given by the numeric
>> +suffix in its name.
>> +
>> +The width of @code{uint} is implementation defined, but must be at least
>> +32-bits and must be equal to the width of the type @code{int}.
>> +
>> +Values of the type @code{uint8} must be in the range @math{0} to @math{255},
>> +inclusive.
>> +
>> +Values of the type @code{uint16} must be in the range @math{0} to @math{65535},
>> +inclusive.
>> +
>> +Values of the type @code{uint32} must be in the range @math{0} to
>> + at math{4294967295}, inclusive.
>> +
>> +Values of the type @code{uint64} must be in the range @math{0} to
>> + at math{18446744073709551615}.
>> +
>
> inclusive

Fixed.

>> +Values of the type @math{uint} must be in the range @math{0} to
>> + at math{2^N - 1}, inclusive; @math{N} being the width of @code{uint}.
>> +
>
> in bits

Done.

> It looks fine to me.

Thanks Peter.  I'll hold off committing it for a few days in case there
are any other comments.

Julien


More information about the reviews mailing list