The ADD statement sums two or more numeric operands and stores the result.
___ Format 1 ___________________________________________________________ | | | <__________________ <___________________________ | | >>__ADD____ _identifier-1_ _|__TO____identifier-2__ _________ _|_____> | | |_literal-1____| |_ROUNDED_| | | | | >__ ____________________________________________ ____________________> | | |_ ____ __SIZE ERROR__imperative-statement-1_| | | |_ON_| | | | | >__ _________________________________________________ _______________> | | |_NOT__ ____ __SIZE ERROR__imperative-statement-2_| | | |_ON_| | | | | >__ _________ ______________________________________________________>< | | |_END-ADD_| | | | |________________________________________________________________________|All identifiers or literals preceding the key word TO are added together, and this sum is added to and stored in identifier-2. This process is repeated for each successive occurrence of identifier-2, in the left-to-right order in which identifier-2 is specified.
___ Format 2 ___________________________________________________________ | | | <__________________ | | >>__ADD____ _identifier-1_ _|__ ____ __ _identifier-2_ ______________> | | |_literal-1____| |_TO_| |_literal-2____| | | | | <___________________________ | | >__GIVING____identifier-3__ _________ _|_____________________________> | | |_ROUNDED_| | | | | >__ ____________________________________________ ____________________> | | |_ ____ __SIZE ERROR__imperative-statement-1_| | | |_ON_| | | | | >__ _________________________________________________ _______________> | | |_NOT__ ____ __SIZE ERROR__imperative-statement-2_| | | |_ON_| | | | | >__ _________ ______________________________________________________>< | | |_END-ADD_| | | | |________________________________________________________________________|The values of the operands preceding the word GIVING are added together, and the sum is stored as the new value of each data item referenced by identifier-3.
___ Format 3 ___________________________________________________________ | | | >>__ADD__ _CORRESPONDING_ __identifier-1__TO__identifier-2___________> | | |_CORR__________| | | | | >__ _________ __ ____________________________________________ _______> | | |_ROUNDED_| |_ ____ __SIZE ERROR__imperative-statement-1_| | | |_ON_| | | | | >__ _________________________________________________ _______________> | | |_NOT__ ____ __SIZE ERROR__imperative-statement-2_| | | |_ON_| | | | | >__ _________ ______________________________________________________>< | | |_END-ADD_| | | | |________________________________________________________________________|Elementary data items within identifier-1 are added to and stored in the corresponding elementary items within identifier-2.
For all Formats:
In Format 2, must name an elementary numeric item, except when following the word GIVING. Each identifier following the word GIVING must name an elementary numeric or numeric-edited item.
In Format 3, must name a group item.
Subtopics:
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.