Structs

A Struct is a container of operands. The operands may be of different data types.

There are four types of Structs:

 

  1. Click the Struct tab on the bottom of the Operand Window.

  2. Either click the Add Struct icon, or right-click and select Add Struct.

  3. Name the Struct and click Save.

    Creating a Struct 1.

  4. Either click the Add icon or right-click the window to add members to the Struct. You can add single operands or arrays, or duplicate a member.

    Creating a Struct 2

You can modify the order of variables within a Struct after they have been created.

  1. Click the Rearrange Members icon.

  2. Drag & drop a member row to the required position. Repeat as needed to arrange the members.

  3. Click Apply Reordering to save your changes, or Cancel Reordering to discard the changes.
    Note that the order of members in a struct determines the column order in Data Tables throughout the system.

You can declare an instance of a Struct either as a global tag, or a local tag.

  1. Right-click the Global Tag window, or the window of a function. Name the instance, then scroll down until you see the name of the desired Struct and select it.

    Declaring a Struct 1

  2. Now that the Struct is declared, you can assign Alias names to the members.

    Declaring a Struct 2

  3. You can also drill down and assign Alias names to individual members within arrays that you have included in the Struct.

    Declaring a Struct 3

Now that the Struct has been declared, it can be used in your program just like any other tag.

You can right-click a Struct to duplicate it and edit its members.

 

Related Topics

Tags (Operands)

Data Types

Creating User-defined Data Tags