Manual Pages for UNIX Darwin command on man SaveResult
MyWebUniversity

Manual Pages for UNIX Darwin command on man SaveResult

TclSaveResult(3) Tcl Library Procedures TclSaveResult(3)

NAME

TclSaveResult, TclRestoreResult, TclDiscardResult - save and restore

an interpreter's result

SYNOPSIS

##iinncclluuddee <>

TTccllSSaavveeRReessuulltt((interp, statePtr)) TTccllRReessttoorreeRReessuulltt((interp, statePtr)) TTccllDDiissccaarrddRReessuulltt((statePtr)) AARRGGUUMMEENNTTSS TclInterp *interp (in) Interpreter for which state should be saved.

TclSavedResult *statePtr (in) Pointer to location where inter-

preter result should be saved or restored.

DESCRIPTION

These routines allows a C procedure to take a snapshot of the current interpreter result so that it can be restored after a call to TTccllEEvvaall

or some other routine that modifies the interpreter result. These rou-

tines are passed a pointer to a structure that is used to store enough information to restore the interpreter result state. This structure can be allocated on the stack of the calling procedure. These routines do not save the state of any error information in the interpreter (e.g. the eerrrroorrCCooddee or eerrrroorrIInnffoo variables). TTccllSSaavveeRReessuulltt moves the string and object results of interp into the location specified by statePtr. TTccllSSaavveeRReessuulltt clears the result for interp and leaves the result in its normal empty initialized state. TTccllRReessttoorreeRReessuulltt moves the string and object results from statePtr

back into interp. Any result or error that was already in the inter-

preter will be cleared. The statePtr is left in an uninitialized state and cannot be used until another call to TTccllSSaavveeRReessuulltt. TTccllDDiissccaarrddRReessuulltt releases the saved interpreter state stored at ssttaatteePPttrr. The state structure is left in an uninitialized state and cannot be used until another call to TTccllSSaavveeRReessuulltt. Once TTccllSSaavveeRReessuulltt is called to save the interpreter result, either TTccllRReessttoorreeRReessuulltt or TTccllDDiissccaarrddRReessuulltt must be called to properly clean up the memory associated with the saved state. KKEEYYWWOORRDDSS result, state, interp

Tcl 8.1 TclSaveResult(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™