Incr Tcl
| Paradigm(s) | multi-paradigm: object-oriented, functional, Imperative, event-driven programming |
|---|---|
| Appeared in | 1993 |
| Designed by | Michael McLennan |
| Developer | Michael McLennan |
| Stable release | itcl4.0a0 |
| Typing discipline | dynamic typing, everything can be treated as a string |
| Influenced by | Tcl, C++ |
incr Tcl (commonly stylised as [incr Tcl], 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 strengthcitation needed. Its name is a pun on "C++". 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.
Contents |
Overview
Features
Namespace support
Itcl 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 integration
Itcl (like Tcl) has built-in support for the integration of C code into Itcl classes.
Licensing
Itcl 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 also
References
incr Tcl from the Ground Up by Chad Smith, published in January 2000.
- This is a complete reference manual for incr Tcl, covering language fundamentals, OO design issues, overloading, code reuse, multiple inheritance, abstract base classes, and performance issues. Despite its breadth, it follows a tutorial, rather than encyclopedic, approach. This book is out of print as of September 2004.
External links
- Itcl/incr Tcl project page
- Tcl package site
- tclweb project (there is a mailing list maintained at this site)
| This programming language–related article is a stub. You can help Wikipedia by expanding it. |
Content from Wikipedia, the Free Encyclopedia
What Is This Site? The Ultimate Study Guide is a mirror of English Wikipedia. It exists in order to provide Wikipedia content to those who are unable to access the main Wikipedia site due to draconian government, employer, or school restrictions. The site displays all the text content from Wikipedia. Our sponsors generously cover part of the cost of hosting this site, and their ads are shown as part of this agreement. We regret that we are unable to display certain controversial images on some pages the site at the request of the sponsors. If you need to see images which we are unable to show, we encourage you to view Wikipedia directly if possible, and apologize for this inconvenience.
A product of XPR Content Systems. 47 Union St #9K, Grand Falls-Windsor NL A2A 2C9 CANADA
