String Data Type

Description

There are two kinds of strings:

  • Variable-length strings, which can contain up to approximately 2 billion (231) characters (approximately 64K (216) characters for Microsoft Windows version 3.1 and earlier).
  • Fixed-length strings, which can contain 1 to approximately 64K (216) characters.

Note Public fixed-length strings can’t be used in class modules.

The type-declaration character for String is $. The codes for String characters range from 0 to 255. The first 128 characters (0 – 127) of the character set correspond to the letters and symbols on a standard U.S. keyboard. These first 128 characters are the same as those defined by the ASCII character set. The second 128 characters (128 – 255) represent special characters, such as letters in international alphabets, accents, currency symbols, and fractions.

See Also

CStr Function, Data Type Summary, Deftype Statements, String Function, Variant Data Type.