High-level Programming Language (Pascal)
Strings (Sequences of Characters)
String constant
'Pascal'
'Programming'
'Hello, how are you ?'
'Tom''s computer' (represents the string Tom's computer)
const Message = 'Error ! Please try again.'
String variable
| var | Name : string [25]; | {declared as a string variable which can hold up to 25 characters} |
| Class : string [2]; |
{declared as a string variable which can hold up to 2 characters} {the integer enclosed in the square brackets specifies the maximum number of characters in a value for the string variable} |
|
| Address : string; | {if the length is not specified, it is assumed a default maximum length of 255 characters} |