Character Data Types
ViviFire supplies three character data types to do work on Unicode characters that make text.
Char
holds one character.
String
and SafeString
can hold a large number of characters.
For how these and other data types compare, see Data Type Summary.
Char
type
The data type Char
is one four-byte Unicode (UTF-32) character.
If you find it necessary to store only one character in a variable, declare it as follows:
Dim initial As Char
Each possible value in a variable of Char
or String
is a code point (or character code) in the Unicode character set.
They can be in the range 0 thru 4,294,967,295 (%X00000000
thru %XFFFFFFFF
).
Unicode characters include the basic ASCII character set (0 thru 127), accented letters, different non-Latin scripts, and signs and symbols.
See Char Data Type for more information.
String
type
The data type String
is a sequence of zero or more Unicode (UTF-8) characters.
If you find it necessary to store a large number of characters in a variable, declare it as follows:
Dim full_name As String
See String Data Type for more information.
SafeString type
The data type SafeString
is almost the same as String
, but with some limits.
It lets you keep a separation between dangerous user-supplied text and safe text.
If you find this safety necessary for a variable, declare it as follows:
Dim full_name As SafeString
See SafeString data type for more information.