< CDuce‎ | Types

The type Char corresponds to the set of all the Unicode characters.

Character literalsEdit

A Unicode character literal is enclosed in single quotes :


Five special characters are escaped:


Arbitrary unicode value can be witten in decimal or hexadecimal way


are corresponding all to the same character. Please note the mandatory ";".

As for the Int type, intervals of characters can be defined. The Byte type is defined in standard way by

type Byte = '\0;'--'\255;'

The types String and Latin1 are respectively defined as sequences of Char and Byte.

#print_type String;;
-> [ Char* ]
#print_type Latin1;;
-> [ Byte* ]