Date:  09/28/2011 07:44:01 PM Msg ID:  004348
From:  FoxWeb Support Thread:  004345
Subject:  Re: I\'m having a problem sorting an array
Works fine for me. Here's the code I used:
 
DIMENSION a_array(3,3)
a_array(1,1) = "ANA"
a_array(1,2) = "38LD0HDN-38L1D0HDR"
a_array(1,3) = "2010-08-24"
  
a_array(2,1) = "ANA"
a_array(2,2) = "38LD0HHV-38L1D0HHZ"
a_array(2,3) = "2010-08-24"
 
a_array(3,1) = "ANA"
a_array(3,2) = "38LD0HI3-38L1D0HI7"
a_array(3,3) = "2011-07-23"
 
 
asort(a_array, 3, -1, 1)
? a_array(1, 1) + ", " + a_array(1, 2) + ", " + a_array(1, 3)
? a_array(2, 1) + ", " + a_array(2, 2) + ", " + a_array(2, 3)
? a_array(3, 1) + ", " + a_array(3, 2) + ", " + a_array(3, 3)
 

FoxWeb Support Team
support@foxweb.com email
 
Sent by Steven Gruner on 09/28/2011 06:27:01 PM:
 I have an array named a_array with the following:
 
(1,1) = "ANA"
(1,2) = "38LD0HDN-38L1D0HDR"
(1,3) = "2010-08-24"
 
(2,1) = "ANA"
(2,2) = "38LD0HHV-38L1D0HHZ"
(2,3) = "2010-08-24"
 
(3,1) = "ANA"
(3,2) = "38LD0HI3-38L1D0HI7"
(3,3) = "2011-07-23"
 
 
I need to sort the array by the date in descending order, but it keeps on giving me a data type error when I use asort(a_array,3,-1,1)