fpc/tests/webtbs/tw25164.pp
2016-08-14 14:09:24 +00:00

16 lines
283 B
ObjectPascal

{ %opt=-Cg }
{ %target=-linux,freebsd,darwin,haiku }
{ %norun }
{$mode objfpc}
procedure permute({out} const _out: PByte; {in} const _in: PByte; {in} const p: PByte; {in} const n: Integer);
var
i: Integer;
begin
for i := 0 to n-1 do
_out[i] := _in[p[i]-1];
end;
begin
end.