📄 23.html
字号:
<HTML><TITLE>Essential Library Functions</TITLE><BODY BGCOLOR="#FFF0E0" VLINK="#0FBD0F" TEXT="#101000" LINK="#0F0FDD">
<A NAME="top"><H1>Essential Library Functions</H1>
<P> This chapter contains descriptions of functions in the Tcl library that are
fundamental to writing C implementations of Tcl commands and to executing Tcl
from C.
<P> Unless otherwise indicated, a library function returns either <TT>TCL_OK</TT> or
<TT>TCL_ERROR</TT>. These are symbolic names for two of the integer codes
returned returned by the <TT>-code</TT> option of Tcl's <TT>return</TT> statement.
When <TT>TCL_ERROR</TT> is returned by the C function, the interpreter's return
string has been set to an error message. Unless you are trying to "catch"
the error with your C code, the way to execute one of these functions is
<PRE>
if( <CITE>Tcl_LibraryFunction</CITE>( ... ) != TCL_OK ) {
<CITE>clean up anything that has become useless because of the error</CITE>
return TCL_ERROR;
}
</PRE>
<P> Unless otherwise indicated, the <TT>Tcl_Interp * Intrp</TT> parameter refers
to the currently executing Tcl interpreter.
<P> Library functions that contain "<TT>Obj</TT>" in their names are
object-based. All others are string-based. Object-based functions are
only available in Tcl version 8.0 or later. The string-based functions
mentioned in this book are available in Tcl version 8.0 as well as in
earlier versions.
<UL>
<LI>
Allocating Memory
<LI>
Manipulating Objects of Type <TT>Tcl_Obj</TT>
<LI>
More about Command Execution
<LI>
Accessing Tcl Variables
<LI>
List Processing
<LI>
Solutions to Exercises
</UL>
<!-- Linkbar -->
<P><CENTER><FONT SIZE=2><NOBR>
<STRONG>From</STRONG>
<A HREF="javascript:if(confirm('http://www.mapfree.com/sbf/tcl/book/home.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/sbf/tcl/book/home.html'" tppabs="http://www.mapfree.com/sbf/tcl/book/home.html">Tcl/Tk For Programmers</A><WBR>
<STRONG>Previous</STRONG>
<A HREF="22.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/22.html">chapter</A><WBR>
<STRONG>Next</STRONG>
<A HREF="24.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/24.html">chapter</A><WBR>
<STRONG>All</STRONG>
<A HREF="Contents.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/Contents.html">chapters</A><WBR>
<STRONG>Author</STRONG>
<A HREF="javascript:if(confirm('http://www.mapfree.com/mp/jaz/home.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/mp/jaz/home.html'" tppabs="http://www.mapfree.com/mp/jaz/home.html">J. A. Zimmer</A><WBR>
<STRONG>Copyright</STRONG>
<A HREF="copyright.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/copyright.html">Notice</A><WBR>
<P>
<I>Jun 17, 1998</I>
</NOBR></FONT></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -