Appendix A. Tcl Command Summary

This appendix summarizes all the Tcl commands available in Tcl version 8.4.14. It lists each command and a short description of the command’s use or purpose.

Command

Description

after

Execute a command after a specified delay.

append

Append data to a variable.

array

Access and manipulate array variables.

binary

Insert and extract data from binary strings.

break

Abort the current loop command.

case

Evaluate one of several scripts, depending on the value of a variable or an expression.

catch

Evaluate a script or command, trapping and optionally handling errors or other exception conditions.

cd

Change the working directory.

clock

Fetch and manipulate time.

close

Close an open I/O channel.

concat

Join lists together.

continue

Skip to the next iteration of a loop.

dde

Execute a Dynamic Data Exchange command (Windows only).

encoding

Manipulate character encodings.

eof

Check for end-of-file condition on an open I/O channel.

error

Raise an error.

eval

Evaluate a Tcl script.

exec

Invoke a subprocess.

exit

Terminate the current Tcl script.

expr

Evaluate an expression.

fblocked

Test to see if the most recent input operation emptied the input buffer.

fconfigure

Get and set options on an I/O channel.

fcopy

Copy data between I/O channels.

fileevent

Execute a script or command when an I/O channel becomes readable or writable.

file

Interrogate and modify file names and file attributes.

flush

Flush any currently buffered output for a channel.

foreach

Iterate over the elements of one or more lists.

format

Format a string in the style of the C language sprintf() function.

for

Execute one or more Tcl scripts or commands a fixed number of iterations.

gets

Read an input line from an open I/O channel.

global

Access global variables.

glob

Return the name(s) of files that match shell-style glob patterns.

history

Manipulate the list of recently executed Tcl commands.

if

Execute a script or command if a certain condition is true.

incr

Increment the value of a variable.

info

Interrogate the internal state of the Tcl interpreter.

interp

Create and manipulate Tcl interpreters.

join

Create a string by joining together list elements.

lappend

Append list elements onto a variable.

lindex

Retrieve an element from a list.

linsert

Insert elements into a list.

list

Create a list.

llength

Determine the number of elements in a list.

load

Load external application code and initialize new commands.

lrange

Return one or more elements from a list.

lreplace

Replace elements in a list with new elements.

lsearch

See if a list contains a particular element.

lset

Modify the value of a list element.

lsort

Sort the elements of a list.

memory

Interface with Tcl’s memory debugger.

namespace

Create and manipulate the contexts in which commands and variables are visible.

open

Open a file-based or command pipeline I/Ochannel.

package

Interrogate and manipulate the list of available Tcl pages.

pid

Retrieve process identifiers.

proc

Create a Tcl procedure.

puts

Send output to an open I/O channel.

pwd

Return the absolute path of the current working directory.

read

Read input from an open I/O channel.

regexp

Match a regular expression against a string.

registry

Manipulate the Windows registry.

regsub

Perform regular expression-based substitutions.

rename

Rename or delete an existing command or procedure.

resource

Manipulate Macintosh resources.

return

Return from a procedure, optionally specifying a return value.

scan

Parse a string using conversion specifiers in the style of the C language sscanf() function.

seek

Change the location of the file pointer in an open I/O channel.

set

Set and retrieve variable values.

socket

Open an I/O channel to a TCP network connection.

source

Evaluate a file or resource as a Tcl script.

split

Split a string into a syntactically correct Tcl list, automatically handling quoting.

string

Manipulate strings.

subst

Perform backslash, command, and variable substitution on a string.

switch

Evaluate one of multiple scripts or commands, depending on the value of a control variable.

tell

Interrogate the current location of the “file” pointer in an open I/ O channel.

time

Determine the execution time of a script.

trace

Monitor and report variable access, command usage, and command execution.

unknown

Handle attempts to use commands that don’t exist.

unset

Delete variables from the current namespace.

update

Process pending events and idle callbacks.

uplevel

Execute a script in a different stack frame.

upvar

Create link to a variable in a different stack frame.

variable

Create and initialize a namespace variable.

vwait

Process events until a specified variable is updated.

while

Execute a script or command as long as a given condition is met.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.242.118