Re: Sort problem
- Posted by don cole <doncole at pacbell.net> Jun 11, 2007
- 587 views
Derek Parnell wrote: > > don cole wrote: > > > Here' my code very simplified. ... > > Don, > you need to be a bit more helpful if you really want some help <G> > > For example, when *you* run this program what is the result you are getting > and what is the result you were expecting? > > To me, both nat_sort() and sort() both work perfectly well in the example you > gave us so I don't see what your problem is. > > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell Hello Derek and all others, This program and data is too lengthy to post here. I will try to cut it down to the important parts. db[1]={"0888","2485","1476"} db[2]={"A1071","A3108","A3011"} db[3]={"D0970","D1078","D2530","D1233"} --Really db[1]= -- db[1][1]=number -- db[1][2]=title -- db[1][3]=prod co. -- db[1][4]=cost -- etc etc.. --this is all saved and loaded in a binary way using fn = open(file_name, "wb") fn = open(file_name, "rb") --I don't think ther is any problem in this because I am loading and reading the --right files only the sort is messed up --the way I read results after sort setText(aETS[x],length(db[x])) --the number of files in the data base setText(bETS[x],db[x][1][1]) --the first record setText(cETS[x],db[x][$][1]) --the last record num of records first record last record --- -- ------- ----- ------ ---- ------ 2514 0888 5105 -- this seems ok now 2527 A1121 A0985 -- this is wrong 3164 D1000 D0999 -- this is wrong Don Cole