Itcl
Encyclopedia
|
| Tutorials | Encyclopedia | Dictionary | Directory |
|
Itcl
incr Tcl (the name is a pun on "C++", and often abbreviated to "itcl") is a set of object-oriented extensions for the Tcl programming language. It is widely used among the Tcl community, and is generally regarded as industrial strength . Itcl implementations exist as both a package that may be dynamically loaded by a Tcl application, as well as an independent standalone language with its own interpreter.
OverviewFeaturesNamespace SupportItcl allows namespaces to be used for organizing commands and variables. Example:
package require Itcl
itcl::class Toaster {
variable crumbs 0
method toast {nslices} {
if {$crumbs > 50} {
error "== FIRE! FIRE! =="
}
set crumbs [expr $crumbs+4*$nslices]
}
method clean {} {
set crumbs 0
}
}
itcl::class SmartToaster {
inherit Toaster
method toast {nslices} {
if {$crumbs > 40} {
clean
}
return [chain $nslices]
}
}
set toaster [SmartToaster #auto]
$toaster toast 2
C Code IntegrationItcl (like TCL) has built-in support for the integration of C code into Itcl classes. LicensingItcl follows the same copyright restrictions as Tcl/Tk. You can use, copy, modify and even redistribute this software without any written agreement or royalty, provided that you keep all copyright notices intact. You cannot claim ownership of the software; the authors and their institutions retain ownership, as described in the "license.terms" files included in the standard distribution. For more information please see incrtcl.sourceforge.net/itcl/copyright.html. See alsoExternal links
References[incr Tcl] from the Ground Up by Chad Smith, published in January 2000.
fr:Incr Tcl pl:Incr Tcl ru:Incr Tcl Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article
|
|
top
©2008-2009 TutorGig.com. All Rights Reserved. Privacy Statement