Always snap to grid

Literals

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 08:18, 6 April 2008 by Wormbo (Talk | contribs) (got no time, but it's a starting point)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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