This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathdivide.lcdoc
More file actions
79 lines (52 loc) · 2 KB
/
divide.lcdoc
File metadata and controls
79 lines (52 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Name: divide
Type: command
Syntax: divide [<chunk> of] <container> by <number>
Syntax: divide <arrayContainer> by {<number> | <array>}
Summary:
Divides a <container> by a number and places the resulting <value> in
the <container>.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
divide field 1 by 52
Example:
divide field "Total Income" by 12
Example:
divide line x of field "Expenses" by percentageRate
Example:
put 100 into tValue
divide tValue by 2
Parameters:
chunk:
A chunk expression specifying a portion of the container.
container:
A field, button, or variable, or the message box.
number:
Any expression that evaluates to a number.
arrayContainer (array):
array (array):
The result:
If <container> is a <field> or <button>, the <format> of the result is
determined by the <numberFormat> <property>.
Description:
Use the <divide> <command> to divide a <container> or a portion of a
<container> by a number, or to divide two <array|arrays> containing
numbers.
The contents of the <container> (or the <chunk> of the <container>) must
be a number or an <expression> that <evaluate|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
<array|arrays> must have the same number of <element(glossary)|elements>
and the same dimension, and each <element(keyword)> in the
<arrayContainer> is divided by the corresponding <element(keyword)> of
the <array>.
If the <container> or an <element(keyword)> of the <arrayContainer> is
empty, the <divide> <command> treats its contents as zero.
Attempting to divide by zero causes an execution error.
References: multiply (command), format (function), value (function),
property (glossary), element (glossary), container (glossary),
expression (glossary), array (glossary), evaluate (glossary),
command (glossary), field (keyword), element (keyword), button (keyword),
/ (operator), numberFormat (property)
Tags: math