subtract | |||||||||||||||||||
Type | command | ||||||||||||||||||
Dictionary | LCS | ||||||||||||||||||
Library | LiveCode Script | ||||||||||||||||||
Syntax |
| ||||||||||||||||||
Summary | Subtracts a number from a container and places the resulting value in the container. | ||||||||||||||||||
Introduced | 1.0 | ||||||||||||||||||
OS | mac, windows, linux, ios, android | ||||||||||||||||||
Platforms | desktop, server, mobile | ||||||||||||||||||
Parameters |
| ||||||||||||||||||
Example |
| ||||||||||||||||||
Related | Keyword: field, element, button Operator: - Property: numberFormat Command: multiply Function: format, value Glossary: property, element, container, expression, array, evaluate, command, math operation | ||||||||||||||||||
Description | Use the subtract command to subtract a number from a container or a portion of a container, or to subtract two arrays containing numbers. 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 subtracted from an arrayContainer, the number is subtracted from each element. If an array is subtracted from an arrayContainer, both arrays must have the same number of elements and the same dimension, and each element in the array is subtracted from the corresponding element of the arrayContainer. If the container or an element of the arrayContainer is empty, the subtract command treats its contents as zero. If container is a field or button, the format of the sum is determined by the numberFormat property. If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information. | ||||||||||||||||||
Tags | math |