Primtive data types
The primitive data types supported by T are as follows:
- Type: Indicates the name for the type
- Width: How many bits it takes up
- 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
- TODO: Sign/zero extension
- Promotion?
- Precedence in interpretation when the first two don’t apply