How to create an array?

Post Reply
ziplux
Posts: 3
Joined: Tue Jul 03, 2001 3:53 pm

How to create an array?

Post by ziplux »

How can I create an array in a LOOP? Basically, I have a list of values I want to add one at a time to evaluate later. I don't see any way to create an array of values, except manually (<$blah = "blah" "blah2" "blah3">) and I can't LOOP on an empty variable because it won't work. Thanks in advance.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

How to create an array?

Post by John »

You can create lists manually as you indicated, or you can append to them: <$blah=$blah "NewBlah">. Where is the list of values coming from? It is usually possible to create the variable directly with the list of values.
John Turnbull
Thunderstone Software
bart
Posts: 251
Joined: Wed Apr 26, 2000 12:42 am

How to create an array?

Post by bart »

Try this:

<$a= a b c d e f g h i j k l>
<$b=>
<loop $a>
<$b=$b $a>
</loop>

b will contain all of a's members
ziplux
Posts: 3
Joined: Tue Jul 03, 2001 3:53 pm

How to create an array?

Post by ziplux »

Thanks John, I didn't realize you could do that. That solves my problem.
Post Reply