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 pathconstant.xml
More file actions
71 lines (71 loc) · 4.69 KB
/
Copy pathconstant.xml
File metadata and controls
71 lines (71 loc) · 4.69 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
<doc>
<legacy_id>2056</legacy_id>
<name>constant</name>
<type>command</type>
<syntax>
<example>constant <i>constantsList</i></example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Values & Properties</category>
</classification>
<references>
<command tag="local">local Command</command>
<constant tag="formfeed">formfeed Constant</constant>
<constant tag="six">six Constant</constant>
<constant tag="ten">ten Constant</constant>
<constant tag="slash">slash Constant</constant>
<constant tag="iBeam">iBeam Constant</constant>
<constant tag="zero">zero Constant</constant>
<constant tag="space">space Constant</constant>
<constant tag="four">four Constant</constant>
<constant tag="false">false Constant</constant>
<constant tag="arrow">arrow Constant</constant>
<constant tag="colon">colon Constant</constant>
<constant tag="CRLF">CRLF Constant</constant>
<constant tag="pi">pi Constant</constant>
<constant tag="help">help Constant</constant>
<constant tag="comma">comma Constant</constant>
<constant tag="plus">plus Constant</constant>
<constant tag="eight">eight Constant</constant>
<constant tag="five">five Constant</constant>
<constant tag="quote">quote Constant</constant>
<constant tag="empty">empty Constant</constant>
<constant tag="null">null Constant</constant>
<constant tag="seven">seven Constant</constant>
<constant tag="watch">watch Constant</constant>
<constant tag="three">three Constant</constant>
<constant tag="two">two Constant</constant>
<function tag="constantNames">constantNames 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>Declares one or more labels to assign to <command tag="constant">constant</command> <glossary tag="value">values</glossary>.</summary>
<examples>
<example>constant defaultName="Jones"</example>
<example>constant entryA="EF9993333WX786",entryB="GJ773281YX342"</example>
</examples>
<description>
<p>Use the <b>constant</b> <glossary tag="command">command</glossary> to assign an unchanging value to a <glossary tag="keyword">keyword</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>constantsList</i> consists of one or more <i>name</i>=<i>value</i> pairs, separated by commas:</p><p> * The <i>name</i> is any <keyword tag="string">string</keyword>.</p><p> * The <i>value</i> is any <glossary tag="literal string">literal string</glossary>.</p><p/><p><b>Comments:</b></p><p>Constants can be numbers, characters, logical values, or strings.</p><p/><p>A constant cannot be defined as an array, only as a single value.</p><p/><p><code/><b>Note:</b><code/> Choose easy-to-understand names for <glossary tag="constant">constants</glossary> to improve the readability of your code. Use <glossary tag="constant">constants</glossary> as substitutes for long or convoluted <glossary tag="string">strings</glossary>.</p><p/><p>If you place the <b>constant</b> <glossary tag="statement">statement</glossary> in a <glossary tag="handler">handler</glossary>, you can use the <command tag="constant">constant</command> anywhere in the <glossary tag="handler">handler</glossary>. If you place the <b>constant</b> <glossary tag="statement">statement</glossary> in a <property tag="script">script</property> outside any <glossary tag="handler">handler</glossary>, you can use the <command tag="constant">constant</command> anywhere in the <glossary tag="handler">handlers</glossary> of that <property tag="script">script</property>.</p><p/><p>Once you have defined a constant, you cannot redefine it in the same handler; doing so causes an execution error.</p><p/><p>You can use the <b>constant</b> <glossary tag="command">command</glossary> to redefine <glossary tag="LiveCode">LiveCode's</glossary> built-in <glossary tag="constant">constants</glossary> within a <property tag="script">script</property> or <glossary tag="handler">handler</glossary>, but doing so makes your code harder to read and maintain. To find out whether a word is already defined as a built-in <command tag="constant">constant</command>, use the <function tag="constantNames">constantNames</function> <control_st tag="function">function</control_st>.</p><p/><p><code/><img src="202651"/> <b>Tip:</b><code/> To see a list of built-in constants, open the Documentation window, click LiveCode Dictionary, and choose "Constants" from the menu at the top of the window.</p>
</description>
</doc>