
there is a variables when i dim a dynamic array
Hi,
To work with modified variable names, or any script lines, concatenate and
use Execute. For your example:
for i=1 to 4
Execute "dim tt_" & i & "()"
next
Execute is slower thatn standard literal execution for large amounts of code
or repetitive operations, but that shouldn't matter here. Execute also has
an undocumented quirk that allows it to set or assign an undimensioned
global variable, circumventing Option Explicit, which may or may not obviate
the need to Dim these variables, depending on the rest of your script.
Joe Earnest
Quote:
> I have 4 dynamic arrays
> dim tt_1()
> dim tt_2()
> dim tt_3()
> dim tt_4()
> ----------------
> i want to do like this:
> for i=1 to 4
> dim tt_i()
> next
> -----------
> but doesn't work
> who can help me!!
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!