Looping
- 30 Jan 2024
- Print
- PDF
Looping
- Updated on 30 Jan 2024
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Looping through arrays of values can be done with the For....Next statement. The syntax is:
For varname1 = varname2 to varname3
Variable varname1 takes on values from the starting value of “varname2” to the ending value of “varname3” by increments of 1. Example code is:
Dim x as integer
Dim NewValue as single
‘Sum Input tags 5 to 20. Put the result in Output tag 4.
For x=5 to 20
NewValue = NewValue + GD(x)
Next x
Tag(4, NewValue)
Was this article helpful?