Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: your mail



On 2014-06-23 12:27:35 -0400, Michel Hack wrote:
> On Mon, 23 Jun 2014 17:51:37 +0200, Vincent Lefèvre wrote:
> > In C, you have _Bool (for booleans), which is also an integer type
> > and can contain only 2 values.
> 
> Yes, but that's intended for something other than a "small integer"
> type.  Indeed, I'm a bit worried that "small integer" might suggest
> something more like "short" than "char".

Yes, "char" should be reserved for characters. But you can consider
int_least8_t (which is a required type), which will have no more
value bits than a signed char (on most platforms, if not all, it
will be equivalent to a signed char).

However, some languages may have smaller integer types. For instance,
Pascal has integer interval types, though these are derived data types.
Now, if the goal is to specify octet-based encodings, you do not have
to care about what the languages have.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)