A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-F3810FE0-CDF7-4ADB-9CF9-58805DF59117
Visible to Intel only — GUID: GUID-F3810FE0-CDF7-4ADB-9CF9-58805DF59117
Aggregate Assignment
For aggregate assignment statements, the variable and expression must have the same structure as the aggregate they reference.
The aggregate assignment statement assigns the value of each field of the aggregate on the right of an equal sign to the corresponding field of the aggregate on the left. Both aggregates must be declared with the same structure.
Examples
The following example shows valid aggregate assignments:
STRUCTURE /DATE/
INTEGER*1 DAY, MONTH
INTEGER*2 YEAR
END STRUCTURE
RECORD /DATE/ TODAY, THIS_WEEK(7)
STRUCTURE /APPOINTMENT/
...
RECORD /DATE/ APP_DATE
END STRUCTURE
RECORD /APPOINTMENT/ MEETING
DO I = 1,7
CALL GET_DATE (TODAY)
THIS_WEEK(I) = TODAY
THIS_WEEK(I).DAY = TODAY.DAY + 1
END DO
MEETING.APP_DATE = TODAY