diff options
Diffstat (limited to 'jim_tcl.txt')
-rw-r--r-- | jim_tcl.txt | 385 |
1 files changed, 212 insertions, 173 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt index 9cfa6f8..97f8374 100644 --- a/jim_tcl.txt +++ b/jim_tcl.txt @@ -3,7 +3,7 @@ Jim Tcl(n) NAME ---- -Jim Tcl v0.82+ - reference manual for the Jim Tcl scripting language +Jim Tcl v0.83+ - reference manual for the Jim Tcl scripting language SYNOPSIS -------- @@ -33,128 +33,135 @@ available only in Jim Tcl. Some notable differences with Tcl 8.5/8.6/8.7 are: -1. Object-based I/O (aio), but with a Tcl-compatibility layer -2. I/O: Support for sockets and pipes including udp, unix domain sockets and IPv6 -3. Integers are 64bit -4. Support for references (`ref`/`getref`/`setref`) and garbage collection -5. Builtin dictionary type (`dict`) with some limitations compared to Tcl 8.6 -6. `env` command to access environment variables -7. Operating system features: `os.fork`, `os.uptime`, `wait`, `signal`, `alarm`, `sleep` -8. Much better error reporting. `info stacktrace` as a replacement for '$errorInfo', '$errorCode' -9. Support for "static" variables in procedures -10. Threads and coroutines are not supported -11. Command and variable traces are not supported -12. Built-in command line editing -13. Expression shorthand syntax: +$(...)+ -14. Modular build allows many features to be omitted or built as dynamic, loadable modules -15. Highly suitable for use in an embedded environment -16. Support for UDP, IPv6, Unix-Domain sockets in addition to TCP sockets +#. Object-based I/O (aio), but with a Tcl-compatibility layer +#. I/O: Support for sockets and pipes including TCP, UDP, UNIX-Domain sockets and IPv6 +#. Integers are 64bit +#. Support for references (`ref`/`getref`/`setref`) and garbage collection +#. Builtin dictionary type (`dict`) with some limitations compared to Tcl 8.6 +#. `env` command to access environment variables +#. Operating system features: `os.fork`, `os.uptime`, `wait`, `signal`, `alarm`, `sleep` +#. Much better error reporting. `info stacktrace` as a replacement for '$errorInfo', '$errorCode' +#. Support for "static" variables in procedures +#. Threads and coroutines are not supported +#. Command and variable traces are not supported +#. Built-in command line editing in interactive mode with autocompletion and hints +#. Expression shorthand syntax: +$(...)+ +#. Modular build allows many features to be omitted or built as dynamic, loadable modules +#. Highly suitable for use in an embedded environment +#. Jim does not convert backslash-newline within braces (in order to preserve accurate line numbers) RECENT CHANGES -------------- -Changes since 0.82 +Changes since 0.83 ~~~~~~~~~~~~~~~~~~ -1. Multi-level `break` and `continue` are now supported -2. `info frame` now only returns 'proc' levels -3. `stacktrace` is now a builtin command -4. The stack trace on error now includes the full stack trace, not just back to where it was caught -5. Improvements with `aio`, related to eventloop and buffering. Add `aio timeout`. -6. `socket` , `open` and `aio accept` now support '-noclose' -7. Add support for hinting with `history hints` -8. Support for `proc` statics by reference (lexical closure) rather than by value -9. `regsub` now supports '-command' (per Tcl 8.7) +#. `aio` - support for configurable read and write buffering +#. Add support for `package forget` +#. Add `aio translation` support (and fconfigure -translation) + +Changes between 0.82 and 0.83 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +#. Multi-level `break` and `continue` are now supported +#. `info frame` now only returns 'proc' levels +#. `stacktrace` is now a builtin command +#. The stack trace on error now includes the full stack trace, not just back to where it was caught +#. Improvements with `aio`, related to eventloop and buffering. Add `aio timeout`. +#. `socket` , `open` and `aio accept` now support '-noclose' +#. Add support for hinting with `history hints` +#. Support for `proc` statics by reference (lexical closure) rather than by value +#. `regsub` now supports '-command' (per Tcl 8.7) +#. Add support for `lsort -dict` Changes between 0.81 and 0.82 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. `try` now supports trap to match on errorcode -2. TIP 603, `aio stat` is now supported to stat a file handle -3. Add support for `socket -async` -4. The handles created by `socket pty` now make the replica name available via 'filename' -5. `info frame` now returns a (largely) Tcl-compatible dictionary, and supports 'info frame 0' -6. `vwait -signal` is now supported -7. ./configure now defaults to '--full' -8. New `timerate` command as an improvement over `time`, somewhat compatible with TIP 527 -9. Add `ensemble` command and support for `namespace ensemble` (as an optional extension) +#. `try` now supports trap to match on errorcode +#. TIP 603, `aio stat` is now supported to stat a file handle +#. Add support for `socket -async` +#. The handles created by `socket pty` now make the replica name available via 'filename' +#. `info frame` now returns a (largely) Tcl-compatible dictionary, and supports 'info frame 0' +#. `vwait -signal` is now supported +#. ./configure now defaults to '--full' +#. New `timerate` command as an improvement over `time`, somewhat compatible with TIP 527 +#. Add `ensemble` command and support for `namespace ensemble` (as an optional extension) Changes between 0.80 and 0.81 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. TIP 582, comments allowed in expressions -2. Many commands now accept "safe" integer expressions rather than simple integers: +#. TIP 582, comments allowed in expressions +#. Many commands now accept "safe" integer expressions rather than simple integers: `loop`, `range`, `incr`, `string repeat`, `lrepeat`, `pack`, `unpack`, `rand` -3. String and list indexes now accept integer expressions (<<_string_and_list_index_specifications,STRING AND LIST INDEX SPECIFICATIONS>>) -4. `loop` can now omit the start value -5. Add the `xtrace` command for execution trace support -6. Add `history keep` -7. Add support for `lsearch -index` and `lsearch -stride`, the latter per TIP 351 -8. `lsort -index` now supports multiple indices -9. Add support for `lsort -stride` -10. `open` now supports POSIX-style access arguments -11. TIP 526, `expr` now only allows a single argument (unless --compat is enabled) +#. String and list indexes now accept integer expressions (<<_string_and_list_index_specifications,STRING AND LIST INDEX SPECIFICATIONS>>) +#. `loop` can now omit the start value +#. Add the `xtrace` command for execution trace support +#. Add `history keep` +#. Add support for `lsearch -index` and `lsearch -stride`, the latter per TIP 351 +#. `lsort -index` now supports multiple indices +#. Add support for `lsort -stride` +#. `open` now supports POSIX-style access arguments +#. TIP 526, `expr` now only allows a single argument (unless --compat is enabled) Changes between 0.79 and 0.80 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. `regsub` now fully supports +{backslash}A+ -2. Add `socket pty` to create a pseudo-tty pair -3. Null characters (\x00) are now supported in variable and proc names -4. dictionaries and arrays now preserve insertion order, matching Tcl and the documentation -5. Add `dict getwithdefault` (and the alias `dict getdef`) per TIP 342 -6. Add string comparison operators (lt, gt, le, ge) per TIP 461 -7. Implement 0d radix prefix for decimal per TIP 472 +#. `regsub` now fully supports +{backslash}A+ +#. Add `socket pty` to create a pseudo-tty pair +#. Null characters (\x00) are now supported in variable and proc names +#. dictionaries and arrays now preserve insertion order, matching Tcl and the documentation +#. Add `dict getwithdefault` (and the alias `dict getdef`) per TIP 342 +#. Add string comparison operators (lt, gt, le, ge) per TIP 461 +#. Implement +0d+ radix prefix for decimal per TIP 472 Changes between 0.78 and 0.79 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. Add `file mtimeus` for high resolution file timestamps -2. `aio` now supports datagram Unix-Domain sockets -3. Add support for `aio lock -wait` -4. Add `signal block` to prevent delivery of signals -5. Add support for `file split` -6. Add support for `json::encode` and `json::decode` -7. `aio tty` now allows setting +echo+ without full +raw+ mode +#. Add `file mtimeus` for high resolution file timestamps +#. `aio` now supports datagram Unix-Domain sockets +#. Add support for `aio lock -wait` +#. Add `signal block` to prevent delivery of signals +#. Add support for `file split` +#. Add support for `json::encode` and `json::decode` +#. `aio tty` now allows setting +echo+ without full +raw+ mode Changes between 0.77 and 0.78 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. Add serial/tty support with `aio tty` -2. Add support for 'jimsh -' -3. Add hidden '-commands' option to many commands -4. Add scriptable autocompletion support in interactive mode with `tcl::autocomplete` -5. Add `aio sockopt` -6. Add scriptable autocompletion support with `history completion` -7. Add support for `tree delete` -8. Add support for `defer` and '$jim::defer' -9. Renamed `os.wait` to `wait`, now more Tcl-compatible and compatible with `exec ... &` -10. `pipe` is now a synonym for `socket pipe` -11. Closing a pipe open with `open |...` now returns Tcl-like status -12. It is now possible to used `exec` redirection with a pipe opened with `open |...` -13. Interactive line editing now supports multiline mode if $::history::multiline is set +#. Add serial/tty support with `aio tty` +#. Add support for 'jimsh -' +#. Add hidden '-commands' option to many commands +#. Add scriptable autocompletion support in interactive mode with `tcl::autocomplete` +#. Add `aio sockopt` +#. Add scriptable autocompletion support with `history completion` +#. Add support for `tree delete` +#. Add support for `defer` and '$jim::defer' +#. Renamed `os.wait` to `wait`, now more Tcl-compatible and compatible with `exec ... &` +#. `pipe` is now a synonym for `socket pipe` +#. Closing a pipe open with `open |...` now returns Tcl-like status +#. It is now possible to used `exec` redirection with a pipe opened with `open |...` +#. Interactive line editing now supports multiline mode if $::history::multiline is set Changes between 0.76 and 0.77 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. Add support for `aio sync` -2. Add SSL and TLS support in aio -3. Added `zlib` -4. Added support for boolean constants in `expr` -5. `string is` now supports 'boolean' class -6. Add support for `aio lock` and `aio unlock` -7. Add new `interp` command +#. Add support for `aio sync` +#. Add SSL and TLS support in aio +#. Added `zlib` +#. Added support for boolean constants in `expr` +#. `string is` now supports 'boolean' class +#. Add support for `aio lock` and `aio unlock` +#. Add new `interp` command Changes between 0.75 and 0.76 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. `glob` now supports the +-tails+ option -2. Add support for `string cat` -3. Allow `info source` to add source info +#. `glob` now supports the +-tails+ option +#. Add support for `string cat` +#. Allow `info source` to add source info Changes between 0.74 and 0.75 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1. `binary`, `pack` and `unpack` now support floating point -2. `file copy` +-force+ handles source and target as the same file -3. `format` now supports +%b+ for binary conversion -4. `lsort` now supports +-unique+ and +-real+ -5. Add support for half-close with `aio close` +?r|w?+ -6. Add `socket pair` for a bidirectional pipe -7. Add '--random-hash' to randomise hash tables for greater security -8. `dict` now supports 'for', 'values', 'incr', 'append', 'lappend', 'update', 'info' and 'replace' -9. `file stat` no longer requires the variable name -10. Add support for `file link` +#. `binary`, `pack` and `unpack` now support floating point +#. `file copy` +-force+ handles source and target as the same file +#. `format` now supports +%b+ for binary conversion +#. `lsort` now supports +-unique+ and +-real+ +#. Add support for half-close with `aio close` +?r|w?+ +#. Add `socket pair` for a bidirectional pipe +#. Add '--random-hash' to randomise hash tables for greater security +#. `dict` now supports 'for', 'values', 'incr', 'append', 'lappend', 'update', 'info' and 'replace' +#. `file stat` no longer requires the variable name +#. Add support for `file link` TCL INTRODUCTION ----------------- @@ -590,41 +597,12 @@ sequence is replaced by the given character: +{backslash}v+:: Vertical tab (0xb). -+{backslash}{+:: - Left brace ({). - -+{backslash}}+:: - Right brace (}). - -+{backslash}[+:: - Open bracket ([). - -+{backslash}]+:: - Close bracket (]). - -+{backslash}$+:: - Dollar sign ($). - -+{backslash}<space>+:: - Space ( ): doesn't terminate argument. - -+{backslash};+:: - Semi-colon: doesn't terminate command. - -+{backslash}"+:: - Double-quote. - -+{backslash}<newline>+:: - Nothing: this joins two lines together - into a single line. This backslash feature is unique in that - it will be applied even when the sequence occurs within braces. - -+{backslash}{backslash}+:: - Backslash ('{backslash}'). - +{backslash}ddd+:: The digits +'ddd'+ (one, two, or three of them) give the octal value of - the character. Note that Jim supports null characters in strings. + the byte. Note that Jim supports null characters in strings. + ++{backslash}xnn+:: + The hexidecimal digits +'nn'+ give the value of the byte. +{backslash}unnnn+:: +{backslash}u\{nnn\}+:: @@ -633,32 +611,24 @@ sequence is replaced by the given character: The 'u' form allows for one to four hex digits. The 'U' form allows for one to eight hex digits. The 'u\{nnn\}' form allows for one to eight hex digits, but makes it easier to insert - characters UTF-8 characters which are followed by a hex digit. - -For example, in the command - ----- - set a \{x\[\ yz\141 ----- - -the second argument to `set` will be +{x[ yza+. + UTF-8 characters that are followed by a hex digit. If a backslash is followed by something other than one of the options -described above, then the backslash is transmitted to the argument -field without any special processing, and the Tcl scanner continues +described above, the backslash is skipped and character following the backslash is treated +as a normal character without any special meaning. The Tcl scanner continues normal processing with the next character. For example, in the command +For example, in the command + ---- - set \*a \\{foo + set a \\{x\[\ yz\141 ---- -The first argument to `set` will be +*a+ and the second -argument will be +{foo+. +the second argument to `set` will be +{x[ yza+. If an argument is enclosed in braces, then backslash sequences inside -the argument are parsed but no substitution occurs (except for -backslash-newline): the backslash +the argument are parsed but no substitution occurs: the backslash sequence is passed through to the argument as is, without making any special interpretation of the characters in the backslash sequence. In particular, backslashed braces are not counted in locating the @@ -2091,7 +2061,7 @@ curry Similar to `alias` except it creates an anonymous procedure (lambda) instead of a named procedure. -the following creates a local, unnamed alias for the command `info exists`. +The following creates a local, unnamed alias for the command `info exists`. ---- set e [local curry info exists] @@ -2130,6 +2100,11 @@ Performs one of several operations on dictionary values. The +'option'+ argument determines what action is carried out by the command. The legal +'options'+ are: ++*dict append* 'dictionaryName key ?string ...?'+:: + This appends the given string (or strings) to the value that + the given key maps to in +'dictionaryName'+. Non-existent keys + are treated as if they map to an empty string. + +*dict create* '?key value \...?'+:: Create and return a new dictionary value that contains each of the key/value mappings listed as arguments (keys and values @@ -2142,6 +2117,9 @@ command. The legal +'options'+ are: dictionary value. This returns a true value exactly when `dict get` on that path will succeed. ++*dict for* '{keyvar valuevar} dictionary script'+:: + *TBD* + +*dict get* 'dictionary ?key \...?'+:: Given a dictionary value (first argument) and a key (second argument), this will retrieve the value for that key. Where several keys are @@ -2162,12 +2140,28 @@ command. The legal +'options'+ are: Similar to `dict get` except if no value exists in the dictionary for the give key(s), returns +'default'+ instead. ++*dict incr* 'dictionaryName key ?increment?'+:: + This adds the given increment value (an integer that defaults + to 1 if not specified) to the value that the given key maps to + in +'dictionaryName'+. Non-existent keys are treated as if + they map to 0. It is an error to increment a value for an + existing key if that value is not an integer. + ++*dict info* 'dictionary'+:: + Returns some information about the utilisation of the data + within the hashtable that represents +'dictionary'+. + +*dict keys* 'dictionary ?pattern?'+:: Returns a list of the keys in the dictionary. If +'pattern'+ is specified, then only those keys whose names match +'pattern'+ (using <<_string_matching,STRING MATCHING>> rules) are included. ++*dict lappend* 'dictionaryName key ?value ...?'+:: + This appends the given items to the list value that the given + key maps to in +'dictionaryName'+. Non-existent keys are treated + as if they map to the empty list. + +*dict merge* ?'dictionary \...'?+:: Return a dictionary that contains the contents of each of the +'dictionary'+ arguments. Where two (or more) dictionaries @@ -2175,6 +2169,13 @@ command. The legal +'options'+ are: maps that key to the value according to the last dictionary on the command line containing a mapping for that key. ++*dict replace* 'dictionary ?key value ...?'+:: + Return a new dictionary that is a copy of +'dictionary'+ + except with some values different or some + extra key/value pairs added. It is legal for this command to + be called with no key/value pairs, but illegal for this command + to be called with a key but no value. + +*dict set* 'dictionaryName key ?key \...? value'+:: This operation takes the +'name'+ of a variable containing a dictionary value and places an updated dictionary value in that variable @@ -2194,6 +2195,16 @@ command. The legal +'options'+ are: least one key must be specified, but the last key on the key-path need not exist. All other components on the path must exist. ++*dict update* 'dictionaryName key varName ?key VarName ...? script'+:: + *TBD* + ++*dict values* 'dictionary ?globPattern?'+:: + Return a list of all values in +'dictionary'+. If a pattern is + supplied, only those values that match it (according to the + rules of `string match`) will be returned. The returned values + will be in the order of that the keys associated with those + values were inserted into the dictionary. + +*dict with* 'dictionaryName key ?key \...? script'+:: Execute the Tcl script in +'script'+ with the value for each key in +'dictionaryName'+ mapped to a variable with the same @@ -2213,8 +2224,6 @@ command. The legal +'options'+ are: explicitly unset). Note that changes to the contents of +'dictionaryName'+ only happen when +'script'+ terminates. -+*dict for, values, incr, append, lappend, update, info, replace*+ to be documented... - ensemble ~~~~~~~~ +*ensemble* 'name ?*-automap*? prefix'+ @@ -2224,15 +2233,15 @@ By default, the prefix is +'name'+ followed by a single space. For example, consider: +---- proc {test open} {name} { ... } proc {test close} {handle} { ... } proc {test show} {handle} { ... } ensemble test +---- Now the '+test+' command has been created that redirects based on the first argument. -e.g. - - test open $filename => {test open} $filename +e.g. +'test open $filename'+ => +'{test open} $filename'+ env ~~~ @@ -3151,16 +3160,13 @@ continues to have global scope while it is active. ---- In this example, the lambda is deleted at the end of the procedure rather -than waiting until garbage collection. +than waiting until garbage collection. Note that `local` returns the command name. ---- proc outer {} { - set x [lambda inner {args} { + set x [local lambda {args} { # will be deleted when 'outer' exits }] - # Use 'function' here which simply returns $x - local function $x - $x ... ... } @@ -3495,18 +3501,29 @@ lsort Sort the elements of +'list'+, returning a new list in sorted order. By default, ASCII (or UTF-8) sorting is used, with the result in increasing order. -Note that only one sort type may be selected with +-integer+, +-real+, +-nocase+ or +-command+ +Note that only one sort type may be selected with +-ascii+, +-dict+, +-integer+, +-real+, +-nocase+ or +-command+ with last option being used. ++*-ascii*+:: + Sort using string comparison. This is the default. + ++*-nocase*+:: + Sort using using string comparison without regard for case. + ++*-dict*+:: + Sort using using string comparison without regard for case. + Use dictionary-style comparison. This is the same as '-ascii' + except (a) case is ignored except as a tie-breaker and (b) if + two strings contain embedded numbers, the numbers compare as + integers, not characters. For example, in -dictionary mode, + x10y sorts between x9y and x11y. + +*-integer*+:: Sort using numeric (integer) comparison. +*-real*+:: Sort using floating point comparison. -+*-nocase*+:: - Sort using using string comparison without regard for case. - +*-command* 'cmdname'+:: +'cmdname'+ is treated as a command name. For each comparison, +'cmdname $value1 $value2+' is called which @@ -3645,32 +3662,34 @@ See also `socket`, `pid`, `exec` package ~~~~~~~ -+*package provide* 'name ?version?'+ ++*package forget* '?name ...?'+:: +Removes the knowledge that the given packages were loaded. This allows new, replacement +packages to be loaded. Note that it does not remove any effects of the previous packages +being loaded. ++*package provide* 'name ?version?'+:: Indicates that the current script provides the package named +'name'+. *Note*: The supplied version is ignored. All packages are registered as version 1.0 (it is simply accepted for compatibility purposes). - + :: Any script that provides a package may include this statement as the first statement, although it is not required. -+*package require* 'name ?version?'+ - ++*package require* 'name ?version?'+:: Searches for the package with the given +'name'+ by examining each path in '$::auto_path' and trying to load '$path/$name.so' as a dynamic extension, or '$path/$name.tcl' as a script package. - + :: The first such file which is found is considered to provide the package. (The version number is ignored). - + :: If '$name.so' exists, it is loaded with the `load` command, otherwise if '$name.tcl' exists it is loaded with the `source` command. - + :: If `load` or `source` fails, `package require` will fail immediately. No further attempt will be made to locate the file. -+*package names*+ - ++*package names*+:: Returns a list of all known/loaded packages, including internal packages. pid @@ -3771,7 +3790,7 @@ Integer parameters may be any integer expression. read ~~~~ -+*read ?-nonewline? 'fileId ?length?'+ ++*read* ?-nonewline? 'fileId ?length?'+ Tcl-compatible alterative version of +'fileId' *read ?-nonewline?* '?length?'+ @@ -4966,16 +4985,19 @@ aio If +'-noclose'+ is given, the returned handle is not automatically closed for child proceses. See `socket` for details. -+$handle *buffering none|line|full*+:: ++$handle *buffering none|line|full* ?size?+:: Sets the output buffering mode of the stream channel. +'none'+ means that puts immediately writes output. +'line'+ means output (including previously buffered output) is written if a newline is to be written. +'full'+ means that data is written when the output buffer is full - (currently approx 64KB). Note that line buffering will also write + (default 64KB). Size may be specified in full mode. + Note that line buffering will also write once the output buffer limit is reached, even if there is no newline. Channels usually begin in full buffering mode, unless they identify as a tty channel, in which case line buffering is used, and `stderr` - begins with no buffering. See also `aio puts` and `aio flush`. + begins with no buffering. Returns the current buffering mode (including + size in full mode - e.g. +'line'+ or +'full 65536+'. + See also `aio puts` and `aio flush`. +$handle *close ?r(ead)|w(rite)? ?-nodelete?*+:: Closes the stream. @@ -5063,6 +5085,12 @@ aio expected number of bytes (including zero). Use `aio eof` to determine if the end-of-file has been reached. ++$handle *readsize* ?size?'+:: + Sets or returns the current size of the read buffer used + for read, gets and copyto. + Defaults to 256, but can be increased to improve performance + for large reads. + +$handle *recvfrom* 'maxlen ?addrvar?'+:: Receives a message from the datagram channel via recvfrom(2) and returns it. At most +'maxlen'+ bytes are read. If +'addrvar'+ is specified, the sending address @@ -5134,6 +5162,12 @@ This command returns an empty string. See `aio read` and `aio gets` for command that use the timeout. Note that the timeout is only used if the channel is in blocking mode. ++$handle *translation binary|text*+:: + This has no effect on Unix platforms, but on Windows it changes the mode of the file + handle to binary or text. In general, use "wb" as the open mode instead, but this + can be useful on existing filehandles such as +stdout+ and +stderr+. It is probably + a good idea to do this immediately before sending any output. + +$handle *tty* ?settings?+:: If no arguments are given, returns a dictionary containing the tty settings for the stream. If arguments are given, they must either be a dictionary, or +setting value \...+. @@ -5245,7 +5279,7 @@ fconfigure command is supported. * `fconfigure ... -blocking` maps to `aio ndelay` * `fconfigure ... -buffering` maps to `aio buffering` - * `fconfigure ... -translation` is accepted but ignored + * `fconfigure ... -translation` maps to `aio translation` and suppports only +binary+ and +text+ [[cmd_2]] eventloop: after, vwait, update @@ -5746,6 +5780,11 @@ namespace ~~~~~~~~~ Provides namespace-related functions. See also: http://www.tcl.tk/man/tcl8.6/TclCmd/namespace.htm ++*namespace canonical* ?current? ?name?+:: + Returns the full name of +'name'+ within namespace '+current+'. + If '+current+' is not given, `namespace current` is used. + If neither are given, returns the current namespace (not qualified with a leading '::'). + +*namespace code* 'script'+:: Captures the current namespace context for later execution of the script +'script'+. It returns a new script in which script has @@ -5757,7 +5796,7 @@ Provides namespace-related functions. See also: http://www.tcl.tk/man/tcl8.6/Tcl +*namespace delete* '?namespace ...?'+:: Deletes all commands and variables with the given namespace prefixes. -+*namespace ensemble create*'+:: ++*namespace ensemble create*+:: Creates an ensemble command for the current namespace (requires the 'ensemble' extension'). +*namespace eval* 'namespace arg ?arg...?'+:: |