forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdelete-variable.lcdoc
More file actions
54 lines (36 loc) · 1.37 KB
/
delete-variable.lcdoc
File metadata and controls
54 lines (36 loc) · 1.37 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
Name: delete variable
Synonyms: clear variable
Type: command
Syntax: delete {local | global | variable} {<variableName> | <arrayIndex>}
Summary:
Removes a <variable> contents from memory.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
local tVariable
delete local tVariable
Example:
global gArray
delete global gArray[17]
Parameters:
variableName:
The name of any local or global variable.
arrayIndex (array):
A key of an array variable. If an arrayIndex is specified instead of a
variable name, the delete variable command removes that element of the
array, without deleting the rest of the elements in the array.
Description:
Use the <delete variable> <command> to free memory used by a large
<variable>. The <delete variable> <command> only removes the contents
of the <variable>.
If you delete a <key> from an <array> <variable>, that <element> of the
<array> no longer exists as part of the <variable>.
>*Note:* <local variable|Local variables> that are used within a
> <handler> are automatically deleted when the <handler> in which they
> are used <exit|exits>.
References: global (command), delete (command), local (command),
globalNames (function), key (glossary), handler (glossary),
variable (glossary), exit (glossary), local variable (glossary),
array (glossary), command (glossary), element (keyword)
Tags: properties