[Year 12 SofDev] ## Need your help in soring - VB 6

Timmer-Arends timmer at melbpc.org.au
Wed Jul 13 10:40:08 EST 2011


Hello Asha

I tried a deskcheck and made two passes of the C1 loop. It appears to be 
moving the pointers so I would expect to see the array printed in a 
different order (I can't tell if it will be the correct order!). If you're 
not getting any change in order then the problem might be that you are 
passing an array to the sub. Does parameter passing default to ByRef or 
ByVal? If ByVal then you would NOT expect to see a change because, while 
a( ) might be sorted, sortlist( ) won't be.

As a quick way out, I see that you have made sortlist( ) and pt( ) GLOBAL 
variables so, insteading of passing them as parameters to the sub, just 
write them directly into the sorting sub. NoItems is also global so your sub 
does not need any paramters passed to it!

Regards
Robert T-A


----- Original Message ----- 
From: "Asha DUBE" <ADU at gwsc.vic.edu.au>
To: "Year 12 Software Development Teachers' Mailing List" 
<sofdev at edulists.com.au>; <sofdev at edulists.com.au>
Sent: Tuesday, July 12, 2011 4:24 PM
Subject: ## [Year 12 SofDev] Need your help in soring - VB 6


Hi all,

I hope all of you enjoying the well deserved break. During the holidays I am 
trying to do some preparation for the next term. While doing examples from 
VB 6 book related with sorting I could no work out the way to solve the 
problem. The attached program does not sort the list. I'll appreciate your 
great help in fixing this problem.

Happy holidays,

Asha





--------------------------------------------------------------------------------


> _______________________________________________
> http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
> IT Software Development Mailing List kindly supported by
> http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority 
> and
> http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
> http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers 
> Association Inc 



More information about the sofdev mailing list