Structure variables

Discussion in 'Code Samples & Tips' started by Erel, May 19, 2007.

  1. Erel

    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.

    Attached Files:

      File size:
      1.5 KB
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice