⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 substobj.3

📁 tcl是工具命令语言
💻 3
字号:
'\"'\" Copyright (c) 2001 Donal K. Fellows'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" RCS: @(#) $Id: SubstObj.3,v 1.1 2001/07/12 13:15:09 dkf Exp $'\" .so man.macros.TH Tcl_SubstObj 3 8.4 Tcl "Tcl Library Procedures".BS.SH NAMETcl_SubstObj \- perform substitutions on Tcl objects.SH SYNOPSIS.nf\fB#include <tcl.h>\fR.spTcl_Obj *\fBTcl_SubstObj\fR(\fIinterp, objPtr, flags\fR).SH ARGUMENTS.AS Tcl_Interp **termPtr;.AP Tcl_Interp *interp inInterpreter in which to execute Tcl scripts and lookup variables.  Ifan error occurs, the interpreter's result is modified to hold an errormessage..AP Tcl_Obj *objPtr inA Tcl object containing the string to perform substitutions on..AP int flags inORed combination of flag bits that specify which substitutions toperform.  The flags \fBTCL_SUBST_COMMANDS\fR,\fBTCL_SUBST_VARIABLES\fR and \fBTCL_SUBST_BACKSLASHES\fR arecurrently supported, and \fBTCL_SUBST_ALL\fR is provided as aconvenience for the common case where all substitutions are desired..BE.SH DESCRIPTION.PPThe \fBTcl_SubstObj\fR function is used to perform substitutions onstrings in the fashion of the \fBsubst\fR command.  It gets the valueof the string contained in \fIobjPtr\fR and scans it, copyingcharacters and performing the chosen substitutions as it goes to anoutput object which is returned as the result of the function.  In theevent of an error occurring during the execution of a command orvariable substitution, the function returns NULL and an error messageis left in \fIinterp\fR's result..PPThree kinds of substitutions are supported.  When the\fBTCL_SUBST_BACKSLASHES\fR bit is set in \fIflags\fR, sequences thatlook like backslash substitutions for Tcl commands are replaced bytheir corresponding character..PPWhen the \fBTCL_SUBST_VARIABLES\fR bit is set in \fIflags\fR,sequences that look like variable substitutions for Tcl commands arereplaced by the contents of the named variable..PPWhen th \fBTCL_SUBST_COMMANDS\fR bit is set in \fIflags\fR, sequencesthat look like command substitutions for Tcl commands are replaced bythe result of evaluating that script.  Where an uncaught continueexception occurs during the evaluation of a command substitution, anempty string is substituted for the command.  Where an uncaught breakexception occurs during the evaluation of a command substitution, theresult of the whole substitution on \fIobjPtr\fR will be truncated atthe point immediately before the start of the command substitution,and no characters will be added to the result or substitutionsperformed after that point..SH "SEE ALSO"subst(n).SH KEYWORDSbackslash substitution, command substitution, variable substitution

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -