View Single Post
  #3  
Old 25th January 2017, 15:13
VishalMistry's Avatar
VishalMistry VishalMistry is offline
Guru
 
Join Date: Dec 2004
Location: India, Gujarat
Posts: 603
VishalMistry has a little shameless behaviour in the past
Baan: Baan IV, ERPLn - DB: SQL Server 2000 / 2008 - OS: Windows Server 2003 / 2008
Hi,

Thanks a lot. I was trying to store 5 numbers in array tmp, and then sort them.
After sorting tmp using qss.sort, when I am printing value of tmp(1,1), It is supposed to be 6, but it is showing 10.The code compiles but array is not sorted. The code is given below:

string tmp(10,5)
store.long(10,tmp(1,1))
store.long(9,tmp(1,2))
store.long(8,tmp(1,3))
store.long(7,tmp(1,4))
store.long(6,tmp(1,5))

long sort_def(1,4)

qss.start(sort_def,1,1)
qss.way(sort_def,1,QSS.UP)
qss.type(sort_def,1,DB.LONG)
qss.sort(tmp,sort_def,1)
t = load.long(tmp(1,1))
message(str$(t))

Can anybody solve, what could be the problem ?

Vishal
Reply With Quote