Char PRIMITIVE

Language-level Alias - char

The character type in Julian language. A char value corresponds to the literal representation of the code point on ASCII table.

In Julian, the char value can be written in literal form quoted with single quote ('). Usually a single character is enclosed by ' and ', but it's also possible to use back-slash () to escape certain control chracaters, among them line feed (\r), carriage return (\n), horizontal tabulation (\t), nul (\0). One can also use octal representation for a character, which takes the form of '\NNN', where N is a digit that is between 0 and 7, inclusive. Note the max value is '~' (or 126 if cast to a byte or an integer).

Char type can be hard-cast to byte or integer value as the index of its code point on ASCII table. For example, 'a' has a numerical value of 97.

Char type can be concatenated to other characters or string value with '+' operator in the literal form of this value.

Char is a primitive type. Therefore it can only be assigned to a variable with same type or an untyped variable.