Tcl Reference Manual: Contents
Contents
·
Index
·
Keywords
·
About...
General
·
Tcl Built-In Commands
·
String Handling
·
List Handling
·
Control Constructs
·
Variables and Procedures
·
Input/Output
·
OO System
·
Packages and Source files
·
Interpreter Routines
·
Library Procedures
·
System Related
·
Platform-specific
·
Tcl C Procedures
·
Initialization
·
Utilities
·
Input/Output
·
The Event Loop
·
Objects
·
Invoking the Interpreter
·
Commands
·
Variables
·
Operating System Interface
General
Tcl - Tool Command Language
tclvars - Variables used by Tcl
Safe Tcl - Creating and manipulating safe interpreters
library - standard library of Tcl procedures
filename - File name conventions supported by Tcl commands
expr - Evaluate an expression
mathop - Mathematical operators as Tcl commands
mathfunc - Mathematical functions for Tcl expressions
tclsh - Simple shell containing Tcl interpreter
tcltest - Test harness support code and utilities
Tcl Built-In Commands
String Handling
string - Manipulate strings
subst - Perform backslash, command, and variable substitutions
regexp - Match a regular expression against a string
regsub - Perform substitutions based on regular expression pattern matching
re_syntax - Syntax of Tcl regular expressions
scan - Parse string using conversion specifiers in the style of sscanf
format - Format a string in the style of sprintf
binary - Insert and extract fields from binary strings
prefix - facilities for prefix matching
List Handling
list - Create a list
split - Split a string into a proper Tcl list
join - Create a string by joining together list elements
concat - Join lists together
llength - Count the number of elements in a list
lindex - Retrieve an element from a list
lrange - Return one or more adjacent elements from a list
linsert - Insert elements into a list
lreplace - Replace elements in a list with new elements
lsort - Sort the elements of a list
lsearch - See if a list contains a particular element
lrepeat - Build a list by repeating elements
lreverse - Reverse the order of a list
dict - Manipulate dictionaries
Control Constructs
if - Execute scripts conditionally
for - 'For' loop
foreach - Iterate over all elements in one or more lists
switch - Evaluate one of several scripts, depending on a given value
case - Evaluate one of several scripts, depending on a given value
while - Execute script repeatedly as long as a condition is met
continue - Skip to the next iteration of a loop
break - Abort looping command
return - Return from a procedure, or set return code of a script
catch - Evaluate script and trap exceptional returns
try - Trap and process errors and exceptions
throw - Generate a machine-readable error
error - Generate an error
eval - Evaluate a Tcl script
uplevel - Execute a script in a different stack frame
apply - Apply an anonymous function
coroutine - Create and produce values from coroutines
tailcall - Replace the current procedure with another command
after - Execute a command after a time delay
update - Process pending events and idle callbacks
vwait - Process events until a variable is written
Variables and Procedures
proc - Create a Tcl procedure
rename - Rename or delete a command
set - Read and write variables
unset - Delete variables
array - Manipulate array variables
namespace - create and manipulate contexts for commands and variables
variable - create and initialize a namespace variable
upvar - Create link to variable in a different stack frame
global - Access global variables
trace - Monitor variable accesses, command usages and command executions
append - Append to variable
incr - Increment the value of a variable
lappend - Append list elements onto a variable
lset - Change an element in a list
lassign - Assign list elements to variables
Input/Output
file - Manipulate file names and attributes
chan - Read, write and manipulate channels
open - Open a file-based or command pipeline channel
close - Close an open channel
socket - Open a TCP network connection
fconfigure - Set and get options on a channel
gets - Read a line from a channel
puts - Write to a channel
read - Read from a channel
seek - Change the access position for an open channel
tell - Return current access position for an open channel
eof - Check for end of file condition on channel
flush - Flush buffered output for a channel
fblocked - Test whether the last input operation exhausted all available input
fcopy - Copy data from one channel to another
fileevent - Execute a script when a channel becomes readable or writable
refchan - command handler API of reflected channels
transchan - command handler API of channel transforms
OO System
define - define and configure classes and objects
object - root class of the class hierarchy
class - class of all classes
my - invoke any method of current object
self - method call internal introspection
next - invoke superclass method implementations
copy - create copies of objects and classes
Packages and Source files
source - Evaluate a file or resource as a Tcl script
load - Load machine code and initialize new commands
unload - Unload machine code
package - Facilities for package loading and version control
tm - Facilities for locating and loading of Tcl Modules
pkg::create - Construct an appropriate 'package ifneeded' command for a given package specification
pkg_mkIndex - Build an index for automatic loading of packages
Interpreter Routines
info - Return information about the state of the Tcl interpreter
interp - Create and manipulate Tcl interpreters
history - Manipulate the history list
bgerror - Command invoked to process background errors
unknown - Handle attempts to use non-existent commands
memory - Control Tcl memory debugging capabilities
Library Procedures
http - Client-side implementation of the HTTP/1.1 protocol
encoding - Manipulate encodings
msgcat - Tcl message catalog
zlib - compression and decompression operations
System Related
cd - Change working directory
pwd - Return the absolute path of the current working directory
clock - Obtain and manipulate dates and times
time - Time the execution of a script
exec - Invoke subprocesses
glob - Return names of files that match patterns
pid - Retrieve process identifiers
exit - End the application
Platform-specific
platform::shell - System identification support code and utilities
platform - System identification support code and utilities
registry - Manipulate the Windows registry
dde - Execute a Dynamic Data Exchange command
Tcl C Procedures
Initialization
Tcl_Main - main program, startup script, and event loop definition for Tcl-based applications
Tcl_AppInit - perform application-specific initialization
Tcl_FindExecutable - identify or return the name of the binary file containing the application
Tcl_CreateInterp - create and delete Tcl command interpreters
Tcl_CreateSlave - manage multiple Tcl interpreters, aliases and hidden commands
Tcl_GetVersion - get the version of the library at runtime
Tcl_RegisterConfig - procedures to register embedded configuration information
Tcl_PkgRequire - package version control
Tcl_StaticPackage - make a statically linked package available via the 'load' command
Tcl_Init - find and source initialization script
Tcl_CallWhenDeleted - Arrange for callback when interpreter is deleted
Tcl_SourceRCFile - source the Tcl rc file
Tcl_Exit - end the application or thread (and invoke exit handlers)
Tcl_Interp - client-visible fields of interpreter structures
Tcl_InitStubs - initialize the Tcl stubs mechanism
Utilities
Tcl_Alloc - allocate or free heap memory
Tcl_Hash - procedures to manage hash tables
Tcl_DString - manipulate dynamic strings
Tcl_SetAssocData - manage associations of string keys and user specified data with Tcl interpreters
Tcl_Preserve - avoid freeing storage while it is being used
Tcl_UtfToUpper - routines for manipulating the case of Unicode characters and UTF-8 strings
Tcl_UniCharIsAlpha - routines for classification of Tcl_UniChar characters
Utf - routines for manipulating UTF-8 strings
Tcl_GetEncoding - procedures for creating and using encodings
Tcl_Concat - concatenate a collection of strings
Tcl_RegExpMatch - Pattern matching with regular expressions
Tcl_SplitList - manipulate Tcl lists
Tcl_SplitPath - manipulate platform-dependent file paths
Tcl_StringMatch - test whether a string matches a pattern
Tcl_GetInt - convert from string to integer, double, or boolean
Tcl_PrintDouble - Convert floating value to string
Tcl_GetIndexFromObj - lookup string in table of keywords
Tcl_WrongNumArgs - generate standard error message for wrong number of arguments
Tcl_ParseArgsObjv - parse arguments according to a tabular description
TCL_MEM_DEBUG - Compile-time flag to enable Tcl memory debugging
Tcl_DumpActiveMemory - Validated memory allocation interface
TclZlib - compression and decompression functions
Input/Output
Tcl_StackChannel - manipulate stacked I/O channels
Tcl_CreateChannel - procedures for creating and manipulating channels
Tcl_CreateChannelHandler - call a procedure when a channel becomes readable or writable
Tcl_CreateCloseHandler - arrange for callbacks when channels are closed
Tcl_CreateFileHandler - associate procedure callbacks with files or devices (Unix only)
Tcl_SetChannelError - functions to create/intercept Tcl errors by channel drivers.
Tcl_GetOpenFile - Return a FILE* for a channel registered in the given interpreter (Unix only)
Standard Channels - How the Tcl library deals with the standard channels
Tcl_GetStdChannel - procedures for retrieving and replacing the standard channels
Tcl_OpenFileChannel - buffered I/O facilities using channels
Tcl_OpenTcpClient - procedures to open channels using TCP sockets
The Event Loop
Tcl_AsyncCreate - handle asynchronous events
Tcl_DoOneEvent - wait for events and invoke event handlers
Tcl_DoWhenIdle - invoke a procedure when there are no pending events
Notifier - the event queue and notifier interfaces
Tcl_Sleep - delay execution for a given number of milliseconds
Tcl_CreateTimerHandler - call a procedure at a given time
Threads - Tcl thread support
Objects
Tcl_Obj - manipulate Tcl values
Tcl_ObjType - manipulate Tcl value types
Tcl_BooleanObj - store/retrieve boolean value in a Tcl_Obj
Tcl_ByteArrayObj - manipulate Tcl values as a arrays of bytes
Tcl_IntObj - manipulate Tcl values as integers
Tcl_DoubleObj - manipulate Tcl values as floating-point values
Tcl_ListObj - manipulate Tcl values as lists
Tcl_StringObj - manipulate Tcl values as strings
Tcl_DictObj - manipulate Tcl values as dictionaries
Invoking the Interpreter
Tcl_Eval - execute Tcl scripts
NRE - Non-Recursive (stackless) evaluation of Tcl scripts.
Tcl_SubstObj - perform substitutions on Tcl values
Tcl_ExprLongObj - evaluate an expression
Tcl_ExprLong - evaluate an expression
Tcl_ParseCommand - parse Tcl scripts and expressions
Tcl_Backslash - parse a backslash sequence
Tcl_CommandComplete - Check for unmatched braces in a Tcl command
Tcl_RecordAndEvalObj - save command on history list before evaluating
Tcl_RecordAndEval - save command on history list before evaluating
Tcl_SetRecursionLimit - set maximum allowable nesting depth in interpreter
Tcl_LimitCheck - manage and check resource limits on interpreters
Tcl_Cancel - cancel Tcl scripts
Tcl_AllowExceptions - allow all exceptions in next script evaluation
Commands
Tcl_CreateObjCommand - implement new commands in C
Tcl_Ensemble - manipulate ensemble commands
Tcl_CreateCommand - implement new commands in C
Tcl_CreateMathFunc - Define, query and enumerate math functions for expressions
Tcl_SetResult - manipulate Tcl result
Tcl_SetErrno - manipulate errno to store and retrieve error codes
Tcl_SaveResult - save and restore an interpreter's state
Tcl_AddErrorInfo - retrieve or record information about errors and other return options
Tcl_BackgroundError - report Tcl exception that occurred in background processing
Tcl_Panic - report fatal error and abort
NRE - Non-Recursive (stackless) evaluation of Tcl scripts.
Tcl_Class - manipulate objects and classes
Tcl_Method - manipulate methods and method-call contexts
Variables
Tcl_SetVar - manipulate Tcl variables
Tcl_LinkVar - link Tcl variable to C variable
Tcl_TraceVar - monitor accesses to a variable
Tcl_UpVar - link one variable to another
Tcl_CreateTrace - arrange for command execution to be traced
Tcl_TraceCommand - monitor renames and deletes of a command
Tcl_Namespace - manipulate namespaces
Operating System Interface
Tcl_PutEnv - procedures to manipulate the environment
Filesystem - procedures to interact with any filesystem
Tcl_GetTime - get date and time
Tcl_GetCwd - manipulate the current working directory
Tcl_GetHostName - get the name of the local host
Tcl_TranslateFileName - convert file name to native form and replace tilde with home directory
Tcl_Access - check file permissions and other attributes
Tcl_DetachPids - manage child processes in background
Tcl_SignalId - Convert signal codes