How to define First Time Initializers of an array of symbols?

FAQ #101843

With PG5 it is possible to define First Time Inizializers to symbols using the syntax :=.

This allows the initialization of symbol contents on download of the application program.

 

Introduction
The feature of initializing an array of symbols can be very handy, but when not done as PG5 expects the inizializers, some errors can be provoked during build time (Error 1211: Too many initializers, or  1212: Missing initializers).

Example
For IL

The following examples show two ways of defining the first time Initializers in IL:

Init the whole array on one line (the amount of initializers must be identical to the array size!)
image

Init one symbol one by one (it's not necessary to init all the symbols from an array)
image

Remark

Don't forget to address the first symbol of an array with "+0" (in the second example). If this is omitted, PG5 assumes that the whole array shall be initialized and will abort the build with the error message:

For Fupla: 
Also in Fupla it's possible to define the first time Initializers of an array
image

 

Categories

PG5 2.0 / SEdit (IL programming)

Last update: 31.05.2015 05:53

First release: 29.07.2013 12:43

Views: 1026

The requested software / document is no longer marketed by Saia-Burgess Controls AG and without technical support. It is an older software version which can be operated only on certain now no longer commercially available products.

Download