The pages listed in Table 1-4 give the primary references for the command.
Table 1-4. Built-in Tcl commands.
Command | Pg. | Description |
---|
after | 218 | Schedule a Tcl command for later execution. |
append | 51 | Append arguments to a variable's value. No spaces added. |
array | 91 | Query array state and search through elements. |
binary | 54 | Convert between strings and binary data. |
break | 77 | Exit loop prematurely. |
catch | 77 | Trap errors. |
cd | 115 | Change working directory. |
clock | 173 | Get the time and format date strings. |
close | 115 | Close an open I/O stream. |
concat | 61 | Concatenate arguments with spaces between. Splices lists. |
console | 28 | Control the console used to enter commands interactively. |
continue | 77 | Continue with next loop iteration. |
error | 79 | Raise an error. |
eof | 109 | Check for end of file. |
eval | 122 | Concatenate arguments and evaluate them as a command. |
exec | 99 | Fork and execute a UNIX program. |
exit | 116 | Terminate the process. |
expr | 6 | Evaluate a math expression. |
fblocked | 223 | Poll an I/O channel to see if data is ready. |
fconfigure | 221 | Set and query I/O channel properties. |
fcopy | 239 | Copy from one I/O channel to another. |
file | 102 | Query the file system. |
fileevent | 219 | Register callback for event-driven I/O. |
flush | 109 | Flush output from an I/O stream's internal buffers. |
for | 76 | Loop construct similar to C for statement. |
foreach | 73 | Loop construct over a list, or lists, of values. |
format | 52 | Format a string similar to C sprintf. |
gets | 112 | Read a line of input from an I/O stream. |
glob | 115 | Expand a pattern to matching file names. |
global | 84 | Declare global variables. |
history | 185 | Use command-line history. |
if | 70 | Conditional command. Allows else and elseif clauses. |
incr | 12 | Increment a variable by an integer amount. |
info | 176 | Query the state of the Tcl interpreter. |
interp | 276 | Create additional Tcl interpreters. |
join | 65 | Concatenate list elements with a given separator string. |
lappend | 61 | Add elements to the end of a list. |
lindex | 63 | Fetch an element of a list. |
linsert | 64 | Insert elements into a list. |
list | 61 | Create a list out of the arguments. |
llength | 63 | Return the number of elements in a list. |
load | 609 | Load shared libraries that define Tcl commands. |
lrange | 63 | Return a range of list elements. |
lreplace | 64 | Replace elements of a list. |
lsearch | 64 | Search for an element of a list that matches a pattern. |
lsort | 65 | Sort a list. |
namespace | 203 | Create and manipulate namespaces. |
open | 110 | Open a file or process pipeline for I/O. |
package | 165 | Provide or require code packages. |
pid | 116 | Return the process ID. |
proc | 81 | Define a Tcl procedure. |
puts | 112 | Output a string to an I/O stream. |
pwd | 115 | Return the current working directory. |
read | 113 | Read blocks of characters from an I/O stream. |
regexp | 148 | Match regular expressions. |
regsub | 152 | Substitute based on regular expressions. |
rename | 82 | Change the name of a Tcl command. |
return | 80 | Return a value from a procedure. |
scan | 54 | Parse a string according to a format specification. |
seek | 114 | Set the seek offset of an I/O stream. |
set | 5 | Assign a value to a variable. |
socket | 228 | Open a TCP/IP network connection. |
source | 26 | Evaluate the Tcl commands in a file. |
split | 65 | Chop a string up into list elements. |
string | 45 | Operate on strings. |
subst | 132 | Substitute embedded commands and variable references. |
switch | 71 | Multi-way branch. |
tell | 114 | Return the current seek offset of an I/O stream. |
time | 191 | Measure the execution time of a command. |
trace | 183 | Monitor variable assignments. |
unknown | 167 | Handle unknown commands. |
unset | 13 | Delete variables. |
uplevel | 130 | Execute a command in a different scope. |
upvar | 85 | Reference a variable in a different scope. |
variable | 197 | Declare namespace variables. |
vwait | 220 | Wait for a variable to be modified. |
while | 73 | Loop until a boolean expression is false. |