Primtive data types

The primitive data types supported by T are as follows:

  1. Type: Indicates the name for the type
  2. Width: How many bits it takes up
  3. Intended interpretation: How it should be interpreted
Type Width Intended interpretation
byte 8 signed byte (two’s complement)
ubyte 8 unsigned byte
short 16 signed short (two’s complement)
ushort 16 unsigned short
int 32 signed int (two’s complement)
uint 32 unsigned int
long 64 signed long (two’s complement)
ulong 64 unsigned long

Conversion rules

  1. TODO: Sign/zero extension
  2. Promotion?
  3. Precedence in interpretation when the first two don’t apply
>> Home