forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete-variable.xml
More file actions
executable file
·63 lines (49 loc) · 3.16 KB
/
Copy pathdelete-variable.xml
File metadata and controls
executable file
·63 lines (49 loc) · 3.16 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
<doc>
<legacy_id>1160</legacy_id>
<name>delete variable</name>
<type>command</type>
<syntax>
<example>delete {local | global | variable} {<i>variableName</i> |<i> arrayIndex</i>}</example>
</syntax>
<synonyms>
<synonym>clear variable</synonym>
</synonyms>
<summary>Removes a <glossary tag="variable">variable</glossary> from memory.</summary>
<examples>
<example>delete local tempVariable</example>
<example><p>global gArray</p><p>delete global gArray[17] </p></example>
</examples>
<history>
<introduced version="1.0">Added.</introduced>
<deprecated version=""></deprecated>
<removed version=""></removed>
<experimental version=""></experimental>
<nonexperimental version=""></nonexperimental>
</history>
<objects>
</objects>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
</security>
<classification>
<category>Values & Properties</category>
</classification>
<references>
<function tag="globalNames">globalNames Function</function>
<command tag="delete">delete Command</command>
<command tag="local">local Command</command>
</references>
<description>Use the <b>delete variable</b> <glossary tag="command">command</glossary> to free memory used by a large <glossary tag="variable">variable</glossary>, or to clean up after using many <glossary tag="variable">variable</glossary> names.<p></p><p><b>Parameters:</b></p><p>The <i>variableName</i> is the name of any <command tag="local">local</command> or <command tag="global">global</command> <glossary tag="variable">variable</glossary>.</p><p></p><p>The <i>arrayIndex</i> is a <glossary tag="key">key</glossary> of an <glossary tag="array">array</glossary> <glossary tag="variable">variable</glossary>. If an <i>arrayIndex</i> is specified instead of a <glossary tag="variable">variable</glossary> name, the <b>delete variable</b> <glossary tag="command">command</glossary> removes that <keyword tag="element">element</keyword> of the <glossary tag="array">array</glossary>, without deleting the rest of the <glossary tag="element">elements</glossary> in the <glossary tag="array">array</glossary>.</p><p></p><p><b>Comments:</b></p><p>If you use theform, the <i>variableName</i>, <command tag="global">global</command> or <command tag="local">local</command>, is deleted.</p><p></p><p>The <b>delete variable</b> <glossary tag="command">command</glossary> not only removes the contents of the <glossary tag="variable">variable</glossary>, but deletes it entirely from memory. If you delete a <glossary tag="key">key</glossary> from an <glossary tag="array">array</glossary> <glossary tag="variable">variable</glossary>, that <keyword tag="element">element</keyword> of the <glossary tag="array">array</glossary> no longer exists as part of the <glossary tag="variable">variable</glossary>.</p><p></p><p></p><note><glossary tag="local variable">Local variables</glossary> that are used within a <glossary tag="handler">handler</glossary> are automatically deleted when the <glossary tag="handler">handler</glossary> in which they are used <glossary tag="exit">exits</glossary>.</note></description>
</doc>