From 244b3e2f72d614e14fcfcc6925cfc806ba3fcd82 Mon Sep 17 00:00:00 2001 From: Devin Asay Date: Tue, 29 Nov 2016 11:27:08 -0700 Subject: [PATCH 1/2] [[ Documentation ]] Changes to asterisk.lcdoc * Updated summary to mention array multiplication. * Added html5 as OS. * Improved examples. * Added note about operator precedence. * Removed unneeded reference. --- docs/dictionary/operator/asterisk.lcdoc | 30 +++++++++++++++---------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/dictionary/operator/asterisk.lcdoc b/docs/dictionary/operator/asterisk.lcdoc index 536ab2422c7..68009fddf36 100644 --- a/docs/dictionary/operator/asterisk.lcdoc +++ b/docs/dictionary/operator/asterisk.lcdoc @@ -5,19 +5,21 @@ Type: operator Syntax: * Summary: -Multiplies two numbers. +Multiplies two numbers or arrays containing numbers. Introduced: 1.0 -OS: mac, windows, linux, ios, android +OS: mac, windows, linux, ios, android, html5 Platforms: desktop, server, mobile Example: +local thisNumber get 3 * 5 -- evaluates to 15 put thisNumber * it into field "Result" Example: +local commonFactor, tempVariable put (3 + commonFactor) * 4 into tempVariable Example: @@ -28,25 +30,29 @@ put tArray * 10 into tProductArray Parameters: number1: - +A number or an expression that evaluates to a number, or an array +containing numbers. number2: -The operands number2 and number2 are numbers or expressions that -evaluate to numbers, or arrays containing numbers. +A number or an expression that evaluates to a number, or an array +containing numbers. Description: Use the <*> (times) to multiply two numbers. +> *Note:* When used in complex arithmetic statements, + like follows standard rules of . + To multiply the contents of a container by a number, use the instead. If either or is an , each of the - must be a number. If an is -multiplied by a number, each is multiplied by the + must be a number. If an is +multiplied by a number, each is multiplied by the number. If an is multiplied by an , both -must have the same number of and the same -dimension, and each in one is multiplied by -the corresponding of the other . +must have the same number of and the same +dimension, and each in one is multiplied by +the corresponding of the other . If an element of one array is empty, the <*> treats its contents as zero. @@ -56,8 +62,8 @@ The option to multiply arrays was introduced in version 1.1. In previous versions, only single numbers could be used with the * operator. References: multiply (command), operator (glossary), array (glossary), -command (glossary), element (glossary), element (keyword), / (operator), -() (operator) +command (glossary), element (glossary), / (operator), +() (operator), precedence (glossary) Tags: math From 38ee48e0701e63b570b84954e1ef04f94443184f Mon Sep 17 00:00:00 2001 From: Devin Asay Date: Wed, 30 Nov 2016 15:47:04 -0700 Subject: [PATCH 2/2] Fixed typo in asterisk.lcdoc --- docs/dictionary/operator/asterisk.lcdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dictionary/operator/asterisk.lcdoc b/docs/dictionary/operator/asterisk.lcdoc index 68009fddf36..4143722e8d0 100644 --- a/docs/dictionary/operator/asterisk.lcdoc +++ b/docs/dictionary/operator/asterisk.lcdoc @@ -41,7 +41,7 @@ Description: Use the <*> (times) to multiply two numbers. > *Note:* When used in complex arithmetic statements, - like follows standard rules of . + like <*> follows standard rules of . To multiply the contents of a container by a number, use the instead.