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 223
Expand file tree
/
Copy pathdash.xml
More file actions
52 lines (52 loc) · 3.58 KB
/
Copy pathdash.xml
File metadata and controls
52 lines (52 loc) · 3.58 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
<doc>
<legacy_id>1601</legacy_id>
<name>-</name>
<type>operator</type>
<syntax>
<example><i>firstNumber</i> - <i>secondNumber</i></example>
<example><i>numberArray</i> - {<i>number</i> | <i>array</i>}</example>
<example><i>-negativeNumber</i></example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Math, Logic, & Dates</category>
</classification>
<references>
<operator tag="()">() Operator</operator>
<command tag="subtract">subtract Command</command>
<keyword tag="--">-- Keyword</keyword>
<operator tag="+">+ Operator</operator>
</references>
<history>
<introduced version="1.0">Added.</introduced>
<changed version="1.1"></changed>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary>Subtracts one number from another, or designates a number as <glossary tag="negative">negative</glossary>.</summary>
<examples>
<example>put -24 into myContainer</example>
<example>put theRight - theLeft into theWidth</example>
<example>put myArray - 17 into adjustedValues</example>
</examples>
<description>
<p>The <b>-</b> (minus) <glossary tag="operator">operator</glossary> serves two purposes. When it has a single <glossary tag="operand">operand</glossary> (<glossary tag="unary">unary</glossary> minus), it negates that number. When it has two <glossary tag="operand">operands</glossary> (<glossary tag="binary">binary</glossary> minus), it subtracts the second number from the first number.</p><p/><p><b>Parameters:</b></p><p>The operands <i>firstNumber</i> and <i>secondNumber</i> are numbers, or <glossary tag="expression">expressions</glossary> that <glossary tag="evaluate">evaluate</glossary> to numbers, or <glossary tag="array">arrays</glossary> containing numbers.</p><p/><p><b>Comments:</b></p><p>To subtract a number from the contents of a container, use the <b>subtract</b> <glossary tag="command">command</glossary>.</p><p/><p>You cannot use the unary minus twice in a row. The expression</p><p> - - someNumber</p><p>causes an error, and the expression</p><p> -- someNumber</p><p>is interpreted as a comment because it starts with the comment keyword <b>--</b>.</p><p/><p>If <i>firstNumber</i> or <i>secondNumber</i> is an <glossary tag="array">array</glossary>, each of the <glossary tag="array">array</glossary> <glossary tag="element">elements</glossary> must be a number. If a number is subtracted from an <glossary tag="array">array</glossary>, the number is subtracted from each <keyword tag="element">element</keyword>. If an <glossary tag="array">array</glossary> is subtracted from an <glossary tag="array">array</glossary>, both <glossary tag="array">arrays</glossary> must have the same number of <glossary tag="element">elements</glossary> and the same dimension, and each <keyword tag="element">element</keyword> in one <glossary tag="array">array</glossary> is subtracted from the corresponding <keyword tag="element">element</keyword> of the other <glossary tag="array">array</glossary>.</p><p/><p>If an element of an array is empty, the <b>-</b> <glossary tag="operator">operator</glossary> treats its contents as zero.</p><p/><p>The unary minus cannot be used with an array.</p><p/><p><b>Changes:</b></p><p>The option to subtract arrays was introduced in version 1.1. In previous versions, only single numbers could be used with the <b>-</b> <glossary tag="operator">operator</glossary>.</p>
</description>
</doc>