| « Convertion from hexa to decinal | Link statically only some specific libraries to a binary » |
Mawk does not provide asort function to sort array.
function alength(A, n, val) {
n = 0
for (val in A) n++
return n
}
function asort(A, hold, i, j, n) {
n = alength(A)
for (i = 2; i <= n ; i++) {
hold = A[j = i]
while (A[j-1] > hold) {
j--
A[j+1] = A[j]
}
A[j] = hold
}
delete A[0 ]
return n
}