2025-10-21 11:40:02 +03:00
|
|
|
|
// Строки. Процедура SetLength, функция Length и свойство Length
|
2015-05-14 22:35:07 +03:00
|
|
|
|
|
|
|
|
|
|
begin
|
2025-10-21 11:40:02 +03:00
|
|
|
|
var s := '';
|
|
|
|
|
|
Println('Length(s) =', s.Length);
|
|
|
|
|
|
SetLength(s, 3);
|
2015-05-14 22:35:07 +03:00
|
|
|
|
s[1] := 'N';
|
|
|
|
|
|
s[2] := 'E';
|
|
|
|
|
|
s[3] := 'T';
|
2025-10-21 11:40:02 +03:00
|
|
|
|
Println(s, ' Length(s) =', s.Length);
|
|
|
|
|
|
for var i := 1 to s.Length do
|
|
|
|
|
|
Print(s[i]);
|
|
|
|
|
|
Println;
|
2015-05-14 22:35:07 +03:00
|
|
|
|
end.
|