Literals
From Unreal Wiki, The Unreal Engine Documentation Site
Literals in general are notations that represent a value. This article describes the types of literals available in UnrealScript.
This article is a stub. You can help Unreal Wiki by expanding it. |
Numbers
In UnrealScript, all numeric literals start with a digit. Numeric literals can either stand for an integer or a floating point value.
Integer numbers
The UnrealScript compiler knows two types of integer literals: decimal and hexadecimal. Decimal literals only consist of the decimal digits 0 to 9, while hexadecimal literals start with 0x
, directly followed by the hexadecimal digits 0 to 9 and A to F.
Some examples:
- 123
- 0xC0FFEE
The first example is a typical decimal literal that can represent a byte or int value, while the second example is a hexadecimal literal that exceeds the byte range and definitely stands for a value of type int.