Arrays

Prev Next
This content is currently unavailable in Ja - 日本語. You are viewing the default (English) version.

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))

© 2024 dataPARC