Hi,
I have an array of type single which I am trying to sort with ARRAY SORT. I am finding after ARRAY SORT, the whole array is filled with zeroes!!! I am confused...
My code is this:
{{GLOBAL VARS DEFINITION FILE}}
GLOBAL opt_capital() AS SINGLE
SUB mainloop()
REDIM opt_capital(200000)
... code to populate opt_capital with values ...
END SUB
SUB Sort()
ARRAY SORT opt_capital()
msgbox(str$(opt_capital(10)))
msgbox(str$(opt_capital(1000)))
msgbox(str$(opt_capital(175000)))
END SUB
Mainloop() correctly populates opt_capital() with values - I have checked.
Each msgbox shows "0"
Can anyone advise please? Thanks.
I have an array of type single which I am trying to sort with ARRAY SORT. I am finding after ARRAY SORT, the whole array is filled with zeroes!!! I am confused...
My code is this:
{{GLOBAL VARS DEFINITION FILE}}
GLOBAL opt_capital() AS SINGLE
SUB mainloop()
REDIM opt_capital(200000)
... code to populate opt_capital with values ...
END SUB
SUB Sort()
ARRAY SORT opt_capital()
msgbox(str$(opt_capital(10)))
msgbox(str$(opt_capital(1000)))
msgbox(str$(opt_capital(175000)))
END SUB
Mainloop() correctly populates opt_capital() with values - I have checked.
Each msgbox shows "0"
Can anyone advise please? Thanks.
Comment