There are several kinds of constants for denoting values of the basic types.
Integer constants have type int or big. They can be represented in several ways.
Decimal integer constants consist of a sequence of decimal digits. A constant with an explicit radix consists of a decimal radix followed by R or r followed by the digits of the number. The radix is between 2 and 36 inclusive; digits above 10 in the number are expressed using letters A to Z or a to z. For example, 16r20 has value 32.
The type of a decimal or explicit-radix number is big if its value exceeds 2^31-1, otherwise it is int.
Character constants consist of a single Unicode character enclosed within single-quote characters '. Inside the quotes the following escape sequences represent special characters:
\' single quote \" double quote \\ backslash \t tab \n newline \r carriage return \b backspace \a alert character (bell) \v vertical tab \udddd Unicode character named by 4 hexadecimal digits \0 NUL
Real constants consist of a sequence of decimal digits containing one period . and optionally followed by e or E and then by a possibly signed integer. If there is an explicit exponent, the period is not required. Real constants have type real.
String constants are sequences of Unicode characters contained in double quotes. They cannot extend across source lines. The same escape sequences listed above for character constants are usable within string constants. Strings have type string.
The constant nil denotes a reference to nothing. It may be used where an object of a reference type is expected; otherwise uninitialized values of reference type start off with this value, it can be assigned to reference objects, and reference types can be tested for equality with it. (The keyword has other uses as well.)