bool a = true;
bool b = 0;
bool c = bool(1.0);
A scalar type that can hold the logical values of either true or false. The values are represented by the constant integer values 1 and 0. Implicit and explicit type conversions are supported.
char a = 42;
char b = 3.1415;
char c = char(true);
A signed integer scalar type with a length of 8 bit. Implicit and explicit type conversions are supported.
uchar a = 42;
uchar b = 3.1415;
uchar c = uchar(true);
An unsigned integer scalar type with a length of 8 bit. Implicit and explicit type conversions are supported.
short a = 42;
short b = 3.1415;
short c = short(true);
A signed integer scalar type with a length of 16 bit. Implicit and explicit type conversions are supported.
ushort a = 42;
ushort b = 3.1415;
ushort c = ushort(true);
An unsigned integer scalar type with a length of 16 bit. Implicit and explicit type conversions are supported.
int a = 42;
int b = 3.1415;
int d = int(true);
A signed integer scalar type with a length of 32 bit. Implicit and explicit type conversions are supported.
uint a = 42;
uint b = 3.1415;
uint c = uint(true);
An unsigned integer scalar type with a length of 32 bit. Implicit and explicit type conversions are supported.
long a = 42;
long b = 3.1415;
long d = long(true);
A signed integer scalar type with a length of 64 bit. Implicit and explicit type conversions are supported.
ulong a = 42;
ulong b = 3.1415;
ulong c = ulong(true);
An unsigned integer scalar type with a length of 64 bit. Implicit and explicit type conversions are supported.
size_t s = sizeof(aFloat4);
An unsigned integer scalar type with a length of 64 bit that is the return value of the sizeof operator. Implicit and explicit type conversions are supported.
ptrdiff_t d = p1 - p0;
A signed integer scalar type with a length of 64 bit that is the result of substracting one pointer from another.
half a = 1.0;
half b = true;
half c = half(1);
A half precision floating point scalar type. Implicit and explicit type conversions are supported.
float a = 1.0;
float b = true;
float c = float(1);
A single precision floating point scalar type. Implicit and explicit type conversions are supported.
void func();
A data type that does not represent a value.