📄 pkgrequire.3
字号:
'\"'\" Copyright (c) 1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) PkgRequire.3 1.4 96/02/15 20:03:16'\" .so man.macros.TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures".BS.SH NAMETcl_PkgRequire, Tcl_PkgProvide \- package version control.SH SYNOPSIS.nf\fB#include <tcl.h>\fR.spchar *\fBTcl_PkgRequire\fR(\fIinterp, name, version, exact\fR).spint\fBTcl_PkgProvide\fR(\fIinterp, name, version\fR).SH ARGUMENTS.AS Tcl_FreeProc clientData.AP Tcl_Interp *interp inInterpreter where package is needed or available..AP char *name inName of package..AP char *version inA version string consisting of one or more decimal numbersseparated by dots..AP int exact inNon-zero means that only the particular version specified by\fIversion\fR is acceptable.Zero means that newer versions than \fIversion\fR are alsoacceptable as long as they have the same major version numberas \fIversion\fR..BE.SH DESCRIPTION.PPThese procedures provide C-level interfaces to Tcl's package andversion management facilities.\fBTcl_PkgRequire\fR is equivalent to the \fBpackage require\fRcommand, and \fBTcl_PkgProvide\fR is equivalent to the\fBpackage provide\fR command.See the documentation for the Tcl commands for details on what theseprocedures do.If \fBTcl_PkgRequire\fR completes successfully it returns a pointerto the version string for the version of the package that is providedin the interpreter (which may be different than \fIversion\fR); ifan error occurs it returns NULL and leaves an error message in\fIinterp->result\fR.\fBTcl_PkgProvide\fR returns TCL_OK if it completes successfully;if an error occurs it returns TCL_ERROR and leaves an error messagein \fIinterp->result\fR..SH KEYWORDSpackage, provide, require, version
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -