Hey guys... I'm trying to write the code for and ascending order selection sort algorithm and every time I try to read the function that I implemented, GAP would just stop working no error messages no nothing so it's difficult to determine the source of error. I need somone to tell me whre did I go wrong with my code.
code: *sortAscending := function(L)* * local x, i, max, hold;* * i := Size(L)-1;* * while i > 0 do* * max := L[i];* * x := i ; * * while x > 0 do* * if L[x] > max then* * max := L[x];* * fi;* * od;* * hold := max;* * max := L[i];* * L[i] := hold;* * i := i -1;* * od;* * return L;* *end; * _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum