deleteSynopsisdelete varname DescriptionDeletes a variable, set, or relation (eset). The item becomes undefined, and the data in it is deleted. Note that while delete behaves almost exactly like a built-in function, it is in fact a keyword in the Grok language. Because of this, it has some peculiarities: it is not included in the set of defined functions reported by fnames, and (in QL) it can be invoded without brackets surrounding its argument. Use delete to remove sets and relations which you no longer have use for. ExampleIn this sample QL session we create a string variable, a set and a relation, delete them with the delete command, and try to access them afterward.
>> variable = "food"
>> aSet = {"pizza", "cake", "sandwich"}
>> relation = set X {variable}
>> variable
food
>> aSet
pizza
sandwich
cake
>> relation
pizza food
sandwich food
cake food
>> delete variable
>> delete aSet
>> delete relation
>> variable
Exception: variable is unresovable
>> aSet
Exception: aSet is unresovable
>> relation
Exception: relation is unresovable
See also |
|