fpc/tests/webtbs/tw1735.pp
2002-09-07 15:40:30 +00:00

23 lines
357 B
ObjectPascal

{$mode delphi}
function UpperCase(S: string): string;
var
i: integer;
begin
for i := 1 to length(s) do
case s[i] of
'a' .. 'z': Dec(s[i], 32);
// 'a' .. 'z': s[i] := chr(ord(s[i])-32);
end;
result := s;
end;
var
s: string;
begin
s := 'abcdef';
writeln(uppercase(s));
writeln(s);
if (s <> 'abcdef') then
halt(1);
end.