Technical FAQs

Ask a Question

How do you initialize an Array of INT to a specific value using an Operate Block in Unity LD?

To set all the values in an 100 element Array of INT to "0", the Operate Block would use the following syntax.

MOVE_INT_ARINT(0, %MW2600:100);

With a slight modification of the syntax you can preset the array elements to a specific value.
For example if you wanted to preset all of the array elements to a value of "1", the syntax would appear as follows.

MOVE_INT_ARINT(1, %MW2600:100);

Note: In these examples the Array of INT is located at %MW2600 - %MW2699.

Was this helpful?
What can we do to improve the information ?