pascalabcnet/InstallerSamples/!Tutorial/07_CharString/String4.pas

12 lines
410 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Строки фиксированной длины. Длина не может быть больше 255
var
s: string[9];
s1: shortstring; // shortstring = string[255]
slong: string;
begin
slong := 'PascalABC.NET';
writeln('Cтрока произвольной длины: ',slong);
s := slong;
writeln('Cтрока фиксированной длины обрезается: ',s);
end.