Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I sure hope this is cool, coz it took its time
#23
It's just bad practice. You can easily send an array to a sub like this...

By the way, it's FB code because of the underscores in the sub names, so it wont run in QB.

Code:
Declare Sub Print_Data( tArray() As Integer )
Declare Sub Fill_Array( tArray() As Integer )



Dim Array(1 To 500) As Integer

Fill_Array( Array() )

Print_Data( Array() )

Sleep










'All of your subs can be way down here, out of the way, or even in a different file.
Sub Print_Data( tArray() As Integer )

    Dim i
    
    For i = Lbound(tArray) To Ubound(tArray)
        Print tArray(i)
    Next

End Sub


Sub Fill_Array( tArray() As Integer )
    Dim i

    For i = Lbound(tArray) To Ubound(tArray)
        tArray(i) = Int(Rnd*1000)
    Next

End Sub
Reply


Messages In This Thread
At a second nazar upon it... - by Pc72 - 11-27-2005, 02:44 AM
I sure hope this is cool, coz it took its time - by Dr_Davenstein - 12-10-2005, 04:09 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)