LB Booster supports the ability to perform arithmetic operations on whole arrays, that is the operation is performed individually on every element of the array without you having to code a loop. For example you can add, subtract, multiply or divide arrays as follows:

Note that the arrays must all be the same size. If each array has a maximum index value of 10 (the default) the first of the above examples is equivalent to (but will run much faster than) this code:

for i =0to10
a(i)= b(i)+ c(i)next i

You can also add, subtract, multiply or divide each element by a scalar numeric value as follows:

a()= b()+ n
a()= b()- n
a()= b()* n
a()= b()/ n

The + (concatenation) operator can be used with string arrays:

a$()= b$()+ c$()
a$()= b$()+"!"

Finally, you can assign the same value to every element of an array in one operation:

by Richard Russell, March 2014LB Boostersupports the ability to perform arithmetic operations on whole arrays, that is the operation is performed individually on every element of the array without you having to code a loop. For example you can add, subtract, multiply or divide arrays as follows:Note that the arrays must all be the same size. If each array has a maximum index value of 10 (the default) the first of the above examples is equivalent to (but will run much faster than) this code:

You can also add, subtract, multiply or divide each element by a scalar numeric value as follows:

The + (concatenation) operator can be used with string arrays:

Finally, you can assign the same value to every element of an array in one operation: