Error getting tags :
error 404Error getting tags :
error 404 add | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
add
Basics
Expander triangle
Type
Command
Syntax

add number to [chunk of] container

add {number | array} to arrayContainer

Introduced
1.0
Changed
1.1
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Adds a number to a container and places the resulting value in the container.
Examples

add 7 to field "Previous Amount"
add field "New" to summaryOfInventory
add qty * price to last line of myOrder

Additional Comments
Expander triangle

Use the add command to add a number to a container or a portion of a container, or to add two arrays containing numbers.

Parameters:

The number is an expression that evaluates to a number.

The chunk is a chunk expression specifying a portion of the container.

The container is a field, button, or variable, or the message box.

The arrayContainer is an array variable each of whose elements is a number.

Comments:

The contents of the container (or the chunk of the container) must be a number or an expression that evaluates to a number.

If a number is added to an arrayContainer, the number is added to each element. If an array is added to an arrayContainer, both arrays must have the same number of elements and the same dimension, and each element in the array is added to the corresponding element of the arrayContainer.

If the container or an element of the arrayContainer is empty, the add command treats its contents as zero.

If container is a field or button, the format of the sum is determined by the numberFormat property.

Changes to Revolution:

The add to arrayContainer form was introduced in version 1.1. In previous versions, only single numbers could be used with the add command.

User Comments
Expander triangle