array donesearch
Ends a search and frees its id.
array donesearch ARRAYNAME SEARCHID
Description
Ends the search SEARCHID. A later use of the id is an error.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| ARRAYNAME | variable name | required | The array of the search. |
| SEARCHID | search id | required | The id of array startsearch. |
Returns
An empty string.
Examples
% array set c {p 1}; set id [array startsearch c]; array donesearch c $id
# The id is gone.
% catch {array anymore c $id}
1
Errors
% array set d {p 1}; set i [array startsearch d]; array donesearch d $i; array donesearch d $i
couldn't find search "s-1-d"
-errorcode TCL LOOKUP ARRAYSEARCH
% array donesearch d bogus
illegal search identifier "bogus"
-errorcode TCL LOOKUP ARRAYSEARCH
% array donesearch d
wrong # args: should be "array donesearch arrayName searchId"
-errorcode TCL WRONGARGS
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1