pascalabcnet/TestSuite/stringelem2.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

15 lines
194 B
ObjectPascal

procedure Test(var c: char);
begin
c := 'k';
end;
var
s: string := 'abcd';
s2: string[5] := '1234';
begin
Test(s[2]);
Test(s2[2]);
assert(s = 'akcd');
assert(s2 = '1k34');
end.