There is no spoon

Difference between revisions of "Literals"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(got no time, but it's a starting point)
(No difference)

Revision as of 08:18, 6 April 2008

Literals in general are notations that represent a value. This article describes the types of literals available in UnrealScript.

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.

Float numbers

Boolean values

Strings

Names

Objects

Structs

Vectors

Rotators

Functions