Table 1-4. Built-in Tcl commands
|
after | 228 | Schedule a Tcl command for later execution. |
append | 56 | Append arguments to a variable's value. No spaces added. |
array | 97 | Query array state and search through elements. |
binary | 59 | Convert between strings and binary data. |
break | 83 | Exit loop prematurely. |
catch | 83 | Trap errors. |
cd | 122 | Change working directory. |
clock | 183 | Get the time and format date strings. |
close | 121 | Close an open I/O stream. |
concat | 65 | Concatenate arguments with spaces between. Splices lists. |
console | 29 | Control the console used to enter commands interactively. |
continue | 83 | Continue with next loop iteration. |
error | 85 | Raise an error. |
eof | 116 | Check for end of file. |
eval | 130 | Concatenate arguments and evaluate them as a command. |
exec | 105 | Fork and execute a UNIX program. |
exit | 124 | Terminate the process. |
expr | 6 | Evaluate a math expression. |
fblocked | 233 | Poll an I/O channel to see if data is ready. |
fconfigure | 231 | Set and query I/O channel properties. |
fcopy | 250 | Copy from one I/O channel to another. |
file | 108 | Query the file system. |
fileevent | 229 | Register callback for event-driven I/O. |
flush | 116 | Flush output from an I/O stream's internal buffers. |
for | 82 | Loop construct similar to C for statement. |
foreach | 79 | Loop construct over a list, or lists, of values. |
format | 56 | Format a string similar to C sprintf. |
gets | 119 | Read a line of input from an I/O stream. |
glob | 122 | Expand a pattern to matching file names. |
global | 90 | Declare global variables. |
history | 196 | Use command-line history. |
if | 76 | Test a condition. Allows else and elseif clauses. |
incr | 12 | Increment a variable by an integer amount. |
info | 186 | Query the state of the Tcl interpreter. |
interp | 292 | Create additional Tcl interpreters. |
join | 72 | Concatenate list elements with a given separator string. |
lappend | 66 | Add elements to the end of a list. |
lindex | 68 | Fetch an element of a list. |
linsert | 68 | Insert elements into a list. |
list | 65 | Create a list out of the arguments. |
llength | 68 | Return the number of elements in a list. |
load | 697 | Load shared libraries that define Tcl commands. |
lrange | 68 | Return a range of list elements. |
lreplace | 68 | Replace elements of a list. |
lsearch | 69 | Search for an element of a list that matches a pattern. |
lset | 62 | Set an element in a list. (Tcl 8.4) |
lsort | 70 | Sort a list. |
namespace | 213 | Create and manipulate namespaces. |
open | 116 | Open a file or process pipeline for I/O. |
package | 175 | Provide or require code packages. |
pid | 124 | Return the process ID. |
proc | 87 | Define a Tcl procedure. |
puts | 119 | Output a string to an I/O stream. |
pwd | 122 | Return the current working directory. |
read | 120 | Read blocks of characters from an I/O stream. |
regexp | 158 | Match regular expressions. |
regsub | 162 | Substitute based on regular expressions. |
rename | 88 | Change the name of a Tcl command. |
return | 86 | Return a value from a procedure. |
scan | 58 | Parse a string according to a format specification. |
seek | 121 | Set the seek offset of an I/O stream. |
set | 5 | Assign a value to a variable. |
socket | 239 | Open a TCP/IP network connection. |
source | 26 | Evaluate the Tcl commands in a file. |
split | 71 | Chop a string up into list elements. |
string | 49 | Operate on strings. |
subst | 140 | Substitute embedded commands and variable references. |
switch | 77 | Test several conditions. |
tell | 121 | Return the current seek offset of an I/O stream. |
time | 202 | Measure the execution time of a command. |
trace | 193 | Monitor variable assignments. |
unknown | 178 | Handle unknown commands. |
unset | 13 | Delete variables. |
uplevel | 138 | Execute a command in a different scope. |
upvar | 91 | Reference a variable in a different scope. |
variable | 207 | Declare namespace variables. |
vwait | 230 | Wait for a variable to be modified. |
while | 79 | Loop until a boolean expression is false. |