Arrays
  • 30 Jan 2024
  • PDF

Arrays

  • PDF

Article summary

Variable names that are used for doing calculations must be defined.  Multiple values can be defined by using arrays.  This is true for both the Dim and Static statements.  This is similar to defining single variables:

                Dim NewValue(100) as Single

The variable name is “NewValue” and it has 100 elements.  

Example code:

Dim NewValue(100) as single

‘Sum Input tags 3, 5 and 9.  Put the result in an intermediate array (position 18) and place in Output tag 4

NewValue(18) =  GD(3) + GD(4) + GD(9)

Tag(4, NewValue(18))


Was this article helpful?

What's Next