Structure Pointer Operator (->)

InstallShield 2019 » InstallScript Language Reference

Use the structure pointer operator to reference individual elements in a structure by means of a pointer variable. The structure pointer operator must appear between the pointer variable name and the element name, with no intervening space. In the example below, a literal value is assigned to each element in a structure.

    typedef  DIMENSIONS

    begin

      SHORT sLength;

      SHORT sWidth;

    end;

    DIMENSIONS Table;

    NUMBER   nvNumValue;

    DIMENSIONS  POINTER    pointerObject;

    begin

      pointerObject = &Table;

      pointerObject->sLength = 500;

      pointerObject->sWidth = 750;

Caution • You can use only one structure pointer in an expression. If structure A contains a member (Bptr) that is a pointer to structure B, which contains a member (Cptr) that is a pointer to structure C, you cannot reference a member of C from A. The expression A.Btptr->Cptr->Cmember is invalid in InstallScript.

See Also