Basic Types

All types in Frost are subclasses of frost.core.Object, but some basic types are so integral to programming that they enjoy special treatment within the compiler. All of these types are in the package frost.core, so that the fully-qualified name of e.g. the 32-bit signed integer type is frost.core.Int32.

Numbers

Frost numbers come in three basic flavors, Int (signed integer), UInt (unsigned integer), and Real (floating point), in several sizes. The following number types are supported:

Numbers may be represented in programs using any of the following:

Bit


Bit is Frost's boolean logic type. Bit has exactly two possible values, true or false, represented by the literal words true and false in a program. Bit values are generally produced by the logical operators, and are often used in control statements such as if, while, and do.

Char

Frost has three different sizes of characters: Char8, Char16, and Char32. Strings can provide their characters in any of the three sizes, but String's API is primarily focused on Char32.

Frost does not have a dedicated Char literal syntax. Any single-character string literal, such as "Q" or "", may be used in a context where a Char that can hold it is expected.

String

Frost strings are represented by a single- or double-quoted sequence of characters that does not contain a newline character. Within a string, the following escape sequences are recognized: