Error getting tags :
error 404Error getting tags :
error 404 divide | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
divide
Basics
Expander triangle
Type
Command
Syntax
divide [chunk of] container by number divide arrayContainer by {number | array}
Introduced
1.0
Changed
1.1
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Divides a container by a number and places the resulting value in the container.
Examples

divide it by 50
divide field "Total Income" by 12
divide line x of field "Expenses" by percentageRate
divide yearlyTotals by 52

Additional Comments
Expander triangle

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

Parameters:

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 number is any expression that evaluates to 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 an arrayContainer is divided by a number, each element is divided by the number. If an arrayContainer is divided by an array, both arrays must have the same number of elements and the same dimension, and each element in the arrayContainer is divided by the corresponding element of the array.

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

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

Attempting to divide by zero causes an execution error.

Changes to Revolution:

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

User Comments
Expander triangle