all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,16 @@
program SortExample
function main()
test1 int[] = [1,-1,8,-8,2,-2,7,-7,3,-3,6,-6,9,-9,4,-4,5,-5,0];
test1.sort(sortFunction);
for(i int from 1 to test1.getSize())
SysLib.writeStdout(test1[i]);
end
end
function sortFunction(a any in, b any in) returns (int)
return (a as int) - (b as int);
end
end

View file

@ -0,0 +1,7 @@
test1 int[] = [1,-1,8,-8,2,-2,7,-7,3,-3,6,-6,9,-9,4,-4,5,-5,0];
RUILib.sort(test1, sortFunction);
function sortFunction(a any in, b any in) returns (int)
return ((a as int) - (b as int));
end