diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 14:23:38 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 14:23:38 (GMT) |
commit | 45beb64f7dcb09a6ce83532702bca760f72e6f4d (patch) | |
tree | f7746a2a8316d612570e1456524e3d182e855c82 /doc/interp.n | |
parent | 5bc57d7b0f63d86fc383565d69f7704943fff94d (diff) | |
download | tcl-45beb64f7dcb09a6ce83532702bca760f72e6f4d.zip tcl-45beb64f7dcb09a6ce83532702bca760f72e6f4d.tar.gz tcl-45beb64f7dcb09a6ce83532702bca760f72e6f4d.tar.bz2 |
Yet more doc update backporting
Diffstat (limited to 'doc/interp.n')
-rw-r--r-- | doc/interp.n | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/interp.n b/doc/interp.n index a118e50..8b1815a 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: interp.n,v 1.9.2.1 2004/10/27 12:52:40 dkf Exp $ +'\" RCS: @(#) $Id: interp.n,v 1.9.2.2 2004/10/27 14:23:56 dkf Exp $ '\" .so man.macros .TH interp n 7.6 Tcl "Tcl Built-In Commands" @@ -618,23 +618,23 @@ by Nathaniel Borenstein and Marshall Rose. .SH EXAMPLES Creating and using an alias for a command in the current interpreter: .CS -\fBinterp\fR alias {} getIndex {} lsearch {alpha beta gamma delta} +\fBinterp alias\fR {} getIndex {} lsearch {alpha beta gamma delta} set idx [getIndex delta] .CE .PP Executing an arbitrary command in a safe interpreter where every invokation of \fBlappend\fR is logged: .CS -set i [\fBinterp\fR create -safe] -\fBinterp\fR hide $i lappend -\fBinterp\fR alias $i lappend {} loggedLappend $i +set i [\fBinterp create\fR -safe] +\fBinterp hide\fR $i lappend +\fBinterp alias\fR $i lappend {} loggedLappend $i proc loggedLappend {i args} { puts "logged invokation of lappend $args" # Be extremely careful about command construction eval [linsert $args 0 \\ - \fBinterp\fR invokehidden $i lappend] + \fBinterp invokehidden\fR $i lappend] } -\fBinterp\fR eval $i $someUntrustedScript +\fBinterp eval\fR $i $someUntrustedScript .CE .SH "SEE ALSO" |