Простой пример:
BEGIN { md[1] = 11; md[2] = 33; md[3] = 44; md[4] = 22; n = asorti(md,mi); printf(«n = %d md[1..4]: %2d %2d %2d %2d\n»,n,md[1],md[2],md[3],md[4]); printf(«n = %d mi[1..4]: %2d %2d %2d %2d\n»,n,mi[1],mi[2],mi[3],mi[4]); }
# Output: # n = 4 md[1..4]: 11 33 44 22 # n = 4 mi[1..4]: 1 2 3 4
# По-моему, д.б.: # n = 4 md[1..4]: 11 33 44 22 # n = 4 mi[1..4]: 1 4 2 3
# В чем дело?