Page 2 of 2 <12
Topic Options
#78092 - 2001-07-12 12:10 AM Re: SortArray() : My function No. 34 (but the first published)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jpols,
heh it prob means that you have your own nameserver there.
well, my domainname surely is registered worldwide and so is my exchangeserver too.
_________________________
!

download KiXnet

Top
#78093 - 2001-07-12 12:49 AM Re: SortArray() : My function No. 34 (but the first published)
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
ok, gone through using our Notes Server !!!
_________________________



Top
#78094 - 2001-07-16 04:23 PM Re: SortArray() : My function No. 34 (but the first published)
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Hiya,

header Row exclusion support added (updated first message, deleted all annoying 'edited by' entries),
decided to do the easy things first

sample :

code:

break on cls
call "path\SortArray.udf"
dim $array[5]
$array[0] = "Location","Name","Member No."
$array[1] = "Stuttgart","jpols",611
$array[2] = "Houston","Bryce",600
$array[3] = "Toronto","Shawn",173
$array[4] = "Brisbane","cj",677
$array[5] = "Jyvaeskylae","Lonkero",2306
$array = SortArray($array,1,3,1) ;ascending by Member No.($array[x][2]),'header row' excluded
for $rc = 0 to ubound($array)
for $col = 0 to ubound($array[$rc])
at($rc*2,$col*15)$array[$rc][$col]
next
next
get $


will now return :

code:

Location Name Member No.

Toronto Shawn 173

Houston Bryce 600

Stuttgart jpols 611

Brisbane cj 677

Jyvaeskylae Lonkero 2306


Jochen

[ 16 July 2001: Message edited by: jpols ]

[ 19 July 2001: Message edited by: jpols ]

_________________________



Top
#78095 - 2001-07-20 12:02 AM Re: SortArray() : My function No. 34 (but the first published)
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
all,

please note that the UDF won't work anymore sorting 2 dimensional arrays using RC1 build 45 , because of the corrected upper bound of arrays

will either rewrite or send a bug report to Ruud ...

Jochen

_________________________



Top
#78096 - 2001-07-20 12:35 AM Re: SortArray() : My function No. 34 (but the first published)
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
hmmm,

'bug report' sended to Ruud , in the mean time here is a Version that Works with RC1 build 45 only (Note also the ammended example)

SortArray_build45.udf

code:

forget the code , i was enlightened by Ruud


Check your existing scripts for inconsistencies (esp. all who received build 43) !!!!!

Jochen


PS.: The 'bug' is a feature - dim $array[3] will now create an array with 4 elements
$array[0] to [3] (as it should do )

so the code wasn't false only the dimension was not up-to-date !

if you want to use SortArray() with build 45 (and i'm shure you'll throw away the Beta releases !) the example should be :

code:

dim $array[5]
$array[0] = "Location","Name","Member No."
$array[1] = "Stuttgart","jpols",611
$array[2] = "Houston","Bryce",600
$array[3] = "Toronto","Shawn",173
$array[4] = "Brisbane","cj",677
$array[5] = "Jyvaeskylae","Lonkero",2306
$array = SortArray($array,1,3,1) ;ascending by Member No.($array[x][2]),'header row' excluded
for $rc = 0 to ubound($array)
for $col = 0 to ubound($array[$rc])
at($rc*2,$col*15)$array[$rc][$col]
next
next
get $

Jochen

[ 19 July 2001: Message edited by: jpols ]

_________________________



Top
Page 2 of 2 <12


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 581 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.087 seconds in which 0.053 seconds were spent on a total of 12 queries. Zlib compression enabled.