Hi,
use LOCATE...INS to another array, like:

* create array
V.ARR = ’’
   FOR V.I = 1 TO 1000
   V.ARR := @FM : RND(1000)
NEXT V.I
DEL V.ARR<1>
* sort it
V.SORTED = ’’
FOR V.I = 1 TO 1000
   V.IN = V.ARR<V.I>
   LOCATE V.IN IN V.SORTED<1> BY ’AN’ SETTING V.INS.POSN ELSE NULL
   INS V.IN BEFORE V.SORTED<V.INS.POSN>
NEXT V.I


VK

On Jan 30, 11:40 am, master <[email protected]> wrote:
> Hi,
>
> Is there a function to sort numerics (float and ints) in jbase?
> Sample this:
>
> TEST = -1 : @FM : 4 :@FM: -399 : @FM : 19
> TEST2 = SORT(TEST)
>
> This gives
>   TEST2                     : -1^-399^19^4
>
> The function treats the values as string and therefore the result is,
> as per the expected outcome, wrong.

-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Reply via email to