Tcl_PkgRequire


HOME

Tcl_PkgRequire

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
KEYWORDS

___________________________

NAME

Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgRequireProc, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx − package version control

SYNOPSIS

#include <tcl.h>

const char *
Tcl_PkgRequire
(interp, name, version, exact)

const char *
Tcl_PkgRequireEx
(interp, name, version, exact, clientDataPtr)

int
Tcl_PkgRequireProc
(interp, name, objc, objv, clientDataPtr)

const char *
Tcl_PkgPresent
(interp, name, version, exact)

const char *
Tcl_PkgPresentEx
(interp, name, version, exact, clientDataPtr)

int
Tcl_PkgProvide
(interp, name, version)

int
Tcl_PkgProvideEx
(interp, name, version, clientData)

ARGUMENTS

Tcl_Interp *interp (in)

Interpreter where package is needed or available.

const char *name (in)

Name of package.

const char *version (in)

A version string consisting of one or more decimal numbers separated by dots.

int exact (in)

Non-zero means that only the particular version specified by version is acceptable. Zero means that newer versions than version are also acceptable as long as they have the same major version number as version.

ClientData clientData (in)

Arbitrary value to be associated with the package.

ClientData *clientDataPtr (out)

Pointer to place to store the value associated with the matching package. It is only changed if the pointer is not NULL and the function completed successfully.

int objc (in)

Number of requirements.

Tcl_Obj* objv[] (in)

Array of requirements.

______________

DESCRIPTION

These procedures provide C-level interfaces to Tcl’s package and version management facilities.

Tcl_PkgRequire is equivalent to the package require command, Tcl_PkgPresent is equivalent to the package present command, and Tcl_PkgProvide is equivalent to the package provide command.

See the documentation for the Tcl commands for details on what these procedures do.

If Tcl_PkgPresent or Tcl_PkgRequire complete successfully they return a pointer to the version string for the version of the package that is provided in the interpreter (which may be different than version); if an error occurs they return NULL and leave an error message in the interpreter’s result.

Tcl_PkgProvide returns TCL_OK if it completes successfully; if an error occurs it returns TCL_ERROR and leaves an error message in the interpreter’s result.

Tcl_PkgProvideEx, Tcl_PkgPresentEx and Tcl_PkgRequireEx allow the setting and retrieving of the client data associated with the package. In all other respects they are equivalent to the matching functions.

Tcl_PkgRequireProc is the form of package require handling multiple requirements. The other forms are present for backward compatibility and translate their invocations to this form.

KEYWORDS

package, present, provide, require, version






Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.