datastore lds_temp
string ls_err
integer i
long ll_array[] = { 2 , 3, 6, 5 }
// The type of columns must be selected, depending on the type of array
string ls_dsdef = &
'release 6; datawindow() table(column=(type=long name=a dbname="a") )'
lds_temp = CREATE datastore
lds_temp.Create(ls_dsdef, ls_err)
lds_temp.object.a.current = ll_array
lds_temp.SetSort("a ASC")
lds_temp.Sort()
ll_array = lds_temp.object.a.current
FOR i = 1 to Upperbound(ll_array)
MessageBox("", string(ll_array[i]))
NEXT
DESTROY lds_temp