 |
Onys Newbie
Joined: 17 Feb 2002 Posts: 4 Location: USA
|
Posted: Fri Mar 08, 2002 5:46 am
Adding items in a list |
Is there any possible way to add the contents of a string list into one variable?
I have a variable that contains
15|16|17|15|20|18|18|19|20
and I want to add each of the numbers to a total and store it in another variable.
Any suggestions?
Onys |
|
|
 |
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Fri Mar 08, 2002 6:31 am |
#VAR sum 0
#VAR theNumbers {15|16|17|15|20|18|18|19|20}
#FORALL @theNumbers {#ADD sum %i}
Troubadour  |
|
|
 |
|
|