Add
See Also: Math Functions, Move, Subtract
Purpose
To perform addition.
Syntax
Add {value} to {variable}
Where {value} is a variable, a constant, or an expression; and {variable} is any variable.
What It Does
The Add command adds the value of {value} to the value of {variable}.
The following two lines of code do the same thing:
Move (invoice.amount + vendor.total_due) to vendor.total_due
Add invoice.amount to vendor.total_due
Using add and subtract commands (rather than expressions) can make your programs easier to understand. This is especially true when using the command with expressions.
For example, use:
Add (invoice.amount - invoice.discount) to vendor.total_due
instead of:
Move (vendor.total_due + (invoice.amount - invoice.discount)) to vendor.total_due