Previous: Array Types To the Table of Content Next: Variant Types

- 2.2.6.10 -
TMT Pascal Language Description
Pascal Language Structure
Types

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.


Previous: Array Types To the Table of Content Next: Variant Types
Array Types Table of Content Variant Types

- 2.2.6.10 -