- 2.2.6.10. -
Table of Contents
2. TMT Pascal Language Description
2.2. Pascal Language Structure
2.2.6. Types
2.2.6.10. String Types
2.2.6.10. String Types
Strings are arrays of characters. The maximum size of a string type is 255
characters. In the following example two string variables are declared,
one with a specific size, the other with the maximum size of 255 characters.
S1: String[100];
S2: String;
The variable S1 holds only the first 100 characters of a string.
S2 may contain up to 255 characters. TMT Pascal reserves one byte,
which contains the size of the string. This size byte is reserved in the byte
that precedes the first character of a string. For instance,
S2 := 'Hello World';
is represented in memory as
#11,Hello World
All string operations, as well as functions and procedures that return or
modify strings, truncate strings that exceed 255 characters.
- 2.2.6.10. -