Array and loop control

Results 1 to 2 of 2

Thread: Array and loop control

  1. #1
    Join Date
    Dec 1969

    Default Array and loop control

    Urgent!! Please help with following code! once i want to increase the array size, the script will always run until times out.<BR><BR>dim num(12) &#060;&#060;== increase to 15<BR>dim rndNumber<BR>do until counter = 12 &#060;&#060;==increase to 15<BR> randomize<BR> n=Int((11 - 1 + 1) * Rnd + 1) &#060;&#060;==becomes (15-1+1)*rnd+1)<BR> t=1<BR> if n &#062; 0 and n &#060; 12 then &#060;&#060;==become n&#060;15<BR> count2=0<BR> for count2=0 to 8 &#060;&#060;==here is the main problem, I cann&#039t event make to the number that same as the highest number of the array.<BR> if n = num(count2) then<BR> t=0<BR> exit for <BR> end if <BR> next<BR> if t=1 then<BR> num(counter)=n<BR> counter=counter+1 <BR> end if<BR> end if<BR>loop<BR><BR>Thanks<BR>Frankie

  2. #2
    Join Date
    Dec 1969

    Default RE: Array and loop control

    use UBound(arrayName)<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts