-- usporiada hodnoty podľa veľkosti v rámci každej skupiny
VECTOR _v, _g;
%CreateVector(_v, 6);
%CreateVector(_g, 6);
_v[1] := 10;
_g[1] := 1;
_v[2] := 9;
_g[2] := 1;
_v[3] := 8;
_g[3] := 1;
_v[4] := 5;
_g[4] := 2;
_v[5] := 4;
_g[5] := 2;
_v[6] := 3;
_g[6] := 2;
-- vrati: 8, 9, 10, 3, 4, 5
_v := %Sort(_v, _g, 1, 0);
RETURN _v;
0 komentárov