Structure variables

Erel

Administrator
Staff member
Licensed User
This example is also included in the desktop installation.
The PieChart is an example of using the new structure variables to better organize the data.

As the number of "slices" is not known, it is first declared with 0 items.
Later, after reading the data file it is redeclared again as a two dimension array. The second dimension value is 5 as the number of fields in the structure.

It is important to understand that structures are converted to arrays during compilation.
A regular (not array) structure will be converted to a one dimension array and an array structure will be converted to an array with one more dimension.
The last dimension length is always as the number of fields in the structure.
 

Attachments

Top