Description

Literals are constant values defined in the program. ATEasy provides five types of literals:

 

Literal type

Description / examples

Integer

Integer literals are constant data elements that have no fractional parts or exponents. An Integer literal can be of type Char, Byte, Short, Word, WChar, Long, or DWord. A literal may be a decimal, hexadecimal, binary, or char constant.

Floating Point

Floating-point constants specify values that must have a fractional part. These values contain decimal points (.) and can contain exponents, such as Float and Double.

String

A string literal consists of zero or more characters from the source character set surrounded by double quotation marks ("), such as: String and BString.

Array

An array literal consists of an array of literals. It is called a complex literal and consists of an open (left) brace, a list of element or field values separated by commas and a closing (right) brace. An array literal can contain other arrays or literals.

Structure

A struct literal is a user-defined literal. It is called a complex literal and consists of an open (left) brace, a list of element or field values separated by commas and a closing (right) brace. A struct literal can contain other structs or literals.

Some literals can be used with escape sequences. For more information, see Escape Sequences.

See Also

Data Types