variable names (VBScript question)

by "Mike Taylor" <lonewolf(at)one.net>

 Date:  Tue, 16 Oct 2001 02:11:39 -0400
 To:  <hwg-languages(at)hwg.org>
  todo: View Thread, Original
I'm trying to dynamically generate variable names but nothing so far seems
to work.

Here's the problem:

I've got a set a variables that all need to be named differently; however,
there is only a slight variation to their variable names:

ThisData = blah

ThatData = yadda

MoreData = foo

The constant in the variable name is "Data" .  I'm trying to do a loop that
sets the variables as it spits out the values.

for i = 1 to 3
    (filler)Data = (the value)
next

In the above, assume that "filler" gets filled with either the word "This",
"That" or "More".  "The value" would be the respective values of those
variables ("blah", "yadda" and "foo")

VBScript craps out whenever I try to combine the "filler" with "Data" to
produce a unique variable name.  Is there a way?

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA