Basic Data Types
Data Type |
Description |
|---|---|
void |
The void type has no associated value and is currently used only as a function return value type. |
match_kind |
|
bool |
Boolean value.
|
Integer (signed/unsigned) |
NOTE:
An integer literal can consist of the bit width and value. For example, 8w10 indicates an 8-bit unsigned integer whose value is 10.
The following are some examples of integer literals. 32w255 // 32-bit unsigned integer whose value is 255. 32w0d255 // Same as above. 0d indicates decimal (default). 32w0xFF // Same as above. 0x indicates hexadecimal. 32s0xFF // 32-bit signed integer whose value is 255. 8w0b10101010 // 8-bit unsigned integer whose value is 170. 0b indicates binary. 8w0b_1010_1010 // Same as above. The underscores are used to facilitate reading. |
Parent topic: Data Types