mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 18:47:52 +02:00
23 lines
357 B
ObjectPascal
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.
|