<structure block reference variable declaration>
┌◄──────────────── . ───────────────┐ ──┴─<structure block type identifier>─┴─ REFERENCE ──<identifier>──────┤
A STRUCTURE BLOCK REFERENCE VARIABLE declaration declares a structure reference variable with the type of the structure block type identifier. A STRUCTURE BLOCK REFERENCE ASSIGNMENT statement can then be used to assign an instance of the structure block of the declared type to this variable.
A reference to an embedded structure block is allowed by the following syntax:
outerSBtype.embeddedSBtype REFERENCE <id>
Identifiers
<structure block reference variable>
An identifier that is associated with a structure block reference in a STRUCTURE BLOCK REFERENCE VARIABLE declaration.
The following example shows the declaration of a structure block reference variable:
TYPE STRUCTURE BLOCK SB;
BEGIN
TYPE STRUCTURE BLOCK SBINNER;
BEGIN
REAL X;
.
.
END;
SBINNER SBINNERVAR;
END;
SB SBVAR;
SB.SBINNER REFERENCE SBINNER_REF;
SBINNER_REF := SBVAR.SBINNERVAR;
