- tcl.lang.Interp -- This manual entry contains Interp methods that manipulate
the result object.
- TclObject getResult()
- void setResult(TclObject tobj)
- void setResult(String str)
- void setResult(int i)
- void setResult(double d)
- void setResult(boolean b)
- void resetResult()
- OTHER METHODS
- EQUIVALENT C FUNCTIONS
- SEE ALSO
tcl.lang.Interp -- This manual entry contains Interp methods that manipulate
the result object.
void setResult(TclObject tobj)
void setResult(String str)
void setResult(int i)
void setResult(double d)
void setResult(boolean b)
The procedures described here are utilities for manipulating the
result value in a Tcl interpreter. The interpreter result is stored
as a TclObject but may be set as a TclObject, String, int, double or
float. See the manual entry backgroundError for information on
- TclObject tobj ()
TclObject value to become result for Interp.
- String str ()
String value to become result for Interp.
- int i ()
Primitive int value to become result for Interp.
- double d ()
Primitive double value to become result for Interp.
- boolean b ()
Primitive boolean value to become result for Interp.
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_ResetResult
Interp, setVar, Eval, backgroundError
The setResult method arranges for the argument to be the result
for interp, replacing any existing result.
The result is left pointing to a TclObject that was converted from one
of the five possible argument types. The TclObjects's reference count
is incremented since there is now a new reference to it from Interp.
The reference count for any old result object
is decremented and the old result object is freed if no
references to it remain.
the getResult method returns the result for Tnterp as a TclObject.
The object's reference count is not incremented;
if the caller needs to retain a long-term handle to the object
they should use preserve method of the TclObject to increment
its reference count in order to keep it from being garbage collected
too early or accidently changed.
The resetResult method clears the result for Interp
and leaves the result in its normal empty initialized state.
The result's reference count is decremented and the result is left
pointing to an unshared object representing an empty string.
Calls to resetResult also clear the error state managed by
addErrorInfo, and setErrorCode.
Copyright © 1994-1998 Sun Microsystems, Inc.
Copyright © 1995-1997 Roger E. Critchlow Jr.