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

📄 saveresult.3

📁 tcl是工具命令语言
💻 3
字号:
'\"'\" Copyright (c) 1997 by Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" RCS: @(#) $Id: SaveResult.3,v 1.2 1999/04/16 00:46:33 stanton Exp $'\" .so man.macros.TH Tcl_SaveResult 3 8.1 Tcl "Tcl Library Procedures".BS.SH NAMETcl_SaveResult, Tcl_RestoreResult, Tcl_DiscardResult \- save and restore an interpreter's result.SH SYNOPSIS.nf\fB#include <tcl.h>\fR.sp\fBTcl_SaveResult(\fIinterp, statePtr\fB)\fR.sp\fBTcl_RestoreResult(\fIinterp, statePtr\fB)\fR.sp\fBTcl_DiscardResult(\fIstatePtr\fB)\fR.SH ARGUMENTS.AS Tcl_SavedResult statePtr.AP Tcl_Interp *interp inInterpreter for which state should be saved..AP Tcl_SavedResult *statePtr inPointer to location where interpreter result should be saved or restored..BE.SH DESCRIPTION.PPThese routines allows a C procedure to take a snapshot of the currentinterpreter result so that it can be restored after a callto \fBTcl_Eval\fR or some other routine that modifies the interpreterresult.  These routines are passed a pointer to a structure that isused to store enough information to restore the interpreter resultstate.  This structure can be allocated on the stack of the callingprocedure.  These routines do not save the state of any errorinformation in the interpreter (e.g. the \fBerrorCode\fR or\fBerrorInfo\fR variables)..PP\fBTcl_SaveResult\fR moves the string and object resultsof \fIinterp\fR into the location specified by \fIstatePtr\fR.\fBTcl_SaveResult\fR clears the result for \fIinterp\fR andleaves the result in its normal empty initialized state..PP\fBTcl_RestoreResult\fR moves the string and object results from\fIstatePtr\fR back into \fIinterp\fR.  Any result or error that wasalready in the interpreter will be cleared.  The \fIstatePtr\fR is leftin an uninitialized state and cannot be used until another call to\fBTcl_SaveResult\fR..PP\fBTcl_DiscardResult\fR releases the saved interpreter statestored at \fBstatePtr\fR.  The state structure is left in anuninitialized state and cannot be used until another call to\fBTcl_SaveResult\fR..PPOnce \fBTcl_SaveResult\fR is called to save the interpreterresult, either \fBTcl_RestoreResult\fR or\fBTcl_DiscardResult\fR must be called to properly clean up thememory associated with the saved state.  .SH KEYWORDSresult, state, interp

⌨️ 快捷键说明

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