sort
sort(x)
Returns the floats list x sorted in ascending order.
sort format
sort(w)format("critere",dimp,ind)
Returns the list w of floats vectors dimension dimp sorted according to criterion
("<", ">" ou "="),
the comparison takes place on the ind element of each vector.
Examples:
Criteria < and >
1) sort(3,1,0,3,-1);
returns (-1,0,1,3,3)
2) sort(3,1,0,3,-1)format(">");
returns (3,3,1,0,-1)
3) Given w=x1,y1,z1,x2,y2,z2,... a 3D polygonal line
sort(w)format(">",3,1);
returns w sorted according to decreasing.
Criterion =
sort(x0,x1,x2)format("=");
if x1 < x0 returns x1.
if x1 < x2 returns x1.
if x2 < x1 returns x2.
Examples:
sort(1,0,2)format("=");
returns 0.
sort(0,1,2)format("=");
returns 1.
sort(0,3,2)format("=");
returns 2.
sort name
sort name("name1")name("name2")
Prints the first different lines of files "name1" and "name2".