18 lines
354 B
Plaintext
18 lines
354 B
Plaintext
$ include "seed7_05.s7i";
|
|
|
|
const func string: reverse (in string: stri) is func
|
|
result
|
|
var string: result is "";
|
|
local
|
|
var integer: index is 0;
|
|
begin
|
|
for index range length(stri) downto 1 do
|
|
result &:= stri[index];
|
|
end for;
|
|
end func;
|
|
|
|
const proc: main is func
|
|
begin
|
|
writeln(reverse("Was it a cat I saw"));
|
|
end func;
|