forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabs.xml
More file actions
49 lines (49 loc) · 2.04 KB
/
Copy pathabs.xml
File metadata and controls
49 lines (49 loc) · 2.04 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
<doc>
<legacy_id>1097</legacy_id>
<name>abs</name>
<type>function</type>
<syntax>
<example>the abs of <i>number</i></example>
<example>abs(<i>number</i>)</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Math, Logic, & Dates</category>
</classification>
<references>
<function tag="round">round Function</function>
<function tag="trunc">trunc Function</function>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary><glossary tag="return">Returns</glossary> the absolute value of a number.</summary>
<examples>
<example>abs(14)</example>
<example>the abs of -14</example>
<example>abs(firstNum - secondNum)</example>
<example>abs(secondNum - firstNum)</example>
</examples>
<description>
<p>Use the <b>abs</b> <control_st tag="function">function</control_st> if you need to know the magnitude of the number and are not concerned about whether it is negative or not.</p><p> </p><p><b>Parameters:</b></p><p>The <i>number</i> is a positive or <glossary tag="negative">negative</glossary> number, or any <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a number.</p><p/><p><b>Value:</b></p><p>The <b>abs</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a positive number.</p><p/><p><b>Comments:</b></p><p>The absolute value of a <i>number</i> is that number's distance from zero. If the <i>number</i> is positive, its absolute value is just the number; if the <i>number</i> is <glossary tag="negative">negative</glossary>, its absolute value is the <glossary tag="negative">negative</glossary> of the number. Because of this, the absolute value of a number is always positive.</p>
</description>
</doc>