Namespace Command

14,000,000 Leading Edge Experts on the ideXlab platform

Scan Science and Technology

Contact Leading Edge Experts & Companies

Scan Science and Technology

Contact Leading Edge Experts & Companies

The Experts below are selected from a list of 6 Experts worldwide ranked by ideXlab platform

Clif Flynt - One of the best experts on this subject based on the ideXlab platform.

  • Namespaces, Packages and Modules
    Tcl Tk, 2012
    Co-Authors: Clif Flynt
    Abstract:

    The Namespace and package Commands implement two different concepts that work together to make it easier to write reusable, modular, easily maintained code. The Namespace Command provides encapsulation support for developing modular code. The package Command and modules provide tools for organizing collections of code into libraries. This chapter discusses the Namespace scope, encapsulating Tcl procedures and data in Namespaces, nesting oneNamespace within another, modularizing Tcl scripts into packages, creating a Tcl module, assembling a Namespaced library within a package, and guidelines for writing modules with relative Namespacepaths. Syntax and sample code are provided where applicable.

  • Namespaces and Packages
    Tcl Tk, 2003
    Co-Authors: Clif Flynt
    Abstract:

    Namespace and package Commands implement two different concepts that work together to make it easier to write reusable, modular, and easily maintained code. The Namespace Command provides encapsulation support for developing modular code. The package Command provides tools for organizing code modules into libraries. Namespace scopes have some of the characteristics of the global scope and some characteristics of a procedure local scope. A Namespace can be viewed as a global scope within a scope and it can contain other Namespaces, creating a tree structure similar to a file system. A script can publish the procedures within a Namespace it considers public, with the Namespace export Command. The Namespace Command has many subCommands, but most Tcl applications will only use the eval, export, and import Commands. A Namespace can be populated with procedures and data either in a single Namespace eval Command or in multiple invocations of the Command. The package provides Command changes a simple set of procedures to a Tcl package. This Command defines a set of procedures as part of a package identified by the package name and a revision number. These procedures can be indexed and can be loaded automatically when they are needed by another script. The Tcl package Command provides a framework for: finding and loading the code modules a script requires, tracking the version numbers of packages and loading the proper version, and defining whether the file to be loaded is a script file or shared library/DLL.