procedure maxel(a) local i, j, max j := i := 1 max := a[1] while i < *a do { i +:= 1 if max <:= a[i] then j := i } return a[j] end