Character Data Types

ViviFire provides two character data types to deal with Unicode characters used in the processing of text. A Char holds a single character, while a String can hold an indefinite number of characters.

For a side-by-side comparison of ViviFire data types, see Data Type Summary.

Char type

The Char data type represents a single four-byte Unicode (UTF-32) character. If you need a variable to store just one character, declare it like the following:

Dim initial As Char

Each possible value in a Char or String variable is a code point, or character code, in the Unicode character set, in the range &H00000000–&HFFFFFFFF (0–4294967295 decimal). Unicode characters include the basic ASCII character set (&H0000–&H007F, 0–127 decimal), accented letters, various non-Latin scripts, and signs and symbols.

For more information, see Char Data Type.

String type

The String data type represents a sequence of zero or more two-byte Unicode (UTF-16) characters. If you need a variable to store an indefinite number of characters, declare it like the following:

Dim full_name As String

For more information, see String Data Type.

See also