diff --git a/docs/dictionary/operator/slash.lcdoc b/docs/dictionary/operator/slash.lcdoc index 0536272322c..2466380707f 100644 --- a/docs/dictionary/operator/slash.lcdoc +++ b/docs/dictionary/operator/slash.lcdoc @@ -2,23 +2,25 @@ Name: / Type: operator -Syntax: /divisor +Syntax: / Summary: -Divides one number by another number. +Divides one number by another number or one array by another array. Introduced: 1.0 -OS: mac, windows, linux, ios, android +OS: mac, windows, linux, ios, android, html5 Platforms: desktop, server, mobile Example: # Dividing a literal number by another +local approxPi put 22/7 into approxPi -- approximates pi Example: # Dividing two variables +local thisVariable get thisVariable/(thisVariable + 1) Example: @@ -30,20 +32,27 @@ put 10 into tDivisorArray[1] put 5 into tDivisorArray[2] put tNumberArray / tDivisorArray into tDividedArray put tDividedArray[1] & comma & tDividedArray[2] -# The result is 1,4 +# Yields 1,4 Parameters: -number: -The operands number and divisor are numbers, or expressions that -evaluate to numbers, or arrays containing numbers. +dividend: +A number or an expression that +evaluates to a number, or an array containing numbers. + +divisor: +A number or an expression that +evaluates to a number, or an array containing numbers. Description: Use the (divide) to divide one number by another. +> *Note:* When used in complex arithmetic statements, + like follows standard rules of . + To divide the contents of a container by a number, use the instead. -If is an , each of the +If or is an , each of the must be a number. If an is divided by a number, each is divided by the number. If an is divided by an , both must have the same @@ -51,17 +60,19 @@ number of and the same dimension, and each in one is divided by the corresponding of the other . -If an element of an array is empty, the treats its +If an element of an array is empty, the treats its contents as zero. -Attempting to divide by zero causes an execution error. +> *Important:* Attempting to divide by zero causes an execution error. + Changes: The option to divide arrays was introduced in version 1.1. In previous versions, only single numbers could be used with the / operator. References: divide (command), operator (glossary), array (glossary), -command (glossary), element (glossary), element (keyword), div (operator), +command (glossary), element (glossary), element (keyword), +div (operator), precedence (glossary), mod (operator), * (operator), wrap (operator) Tags: math