GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TCL_SUBSTOBJ (3)

NAME

Tcl_SubstObj - perform substitutions on Tcl objects

CONTENTS

Synopsis
Arguments
Description
Keywords

SYNOPSIS

#include <tcl.h>

Tcl_Obj * Tcl_SubstObj(interp, objPtr, flags)

ARGUMENTS


.TP 15 Tcl_Interp *interp (in)
Tcl_Interp*interp Tcl_Interp Interpreter in which to execute Tcl scripts and lookup variables. If an error occurs, the interpreter’s result is modified to hold an error message.
.TP 15 Tcl_Obj *objPtr (in)
Tcl_Obj   *objPtr Tcl_Obj A Tcl object containing the string to perform substitutions on.
.TP 15 int flags (in)
int       flags int ORed combination of flag bits that specify which substitutions to perform. The flags TCL_SUBST_COMMANDS, TCL_SUBST_VARIABLES and TCL_SUBST_BACKSLASHES are currently supported, and TCL_SUBST_ALL is provided as a convenience for the common case where all substitutions are desired.

   








\L’|0u-1v’\l’75u+3n_’\L’0u+1v-0u’\l’|0u-1.5n_’



\L’|0u-1v’\L’0u+1v-0u’\l’|0u-1.5n_’





DESCRIPTION

The Tcl_SubstObj function is used to perform substitutions on strings in the fashion of the subst command. It gets the value of the string contained in objPtr and scans it, copying characters and performing the chosen substitutions as it goes to an output object which is returned as the result of the function. In the event of an error occurring during the execution of a command or variable substitution, the function returns NULL and an error message is left in interp’s result.

Three kinds of substitutions are supported. When the TCL_SUBST_BACKSLASHES bit is set in flags, sequences that look like backslash substitutions for Tcl commands are replaced by their corresponding character.

When the TCL_SUBST_VARIABLES bit is set in flags, sequences that look like variable substitutions for Tcl commands are replaced by the contents of the named variable.

When the TCL_SUBST_COMMANDS bit is set in flags, sequences that look like command substitutions for Tcl commands are replaced by the result of evaluating that script. Where an uncaught “continue exception” occurs during the evaluation of a command substitution, an empty string is substituted for the command. Where an uncaught “break exception” occurs during the evaluation of a command substitution, the result of the whole substitution on objPtr will be truncated at the point immediately before the start of the command substitution, and no characters will be added to the result or substitutions performed after that point.

SEE ALSO

subst(n)

KEYWORDS

backslash substitution, command substitution, variable substitution
Search for    or go to Top of page |  Section 3 |  Main Index


Tcl TCL_SUBSTOBJ (3) 8.4

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.