OTcl usually refers to an
object oriented
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pro ...
extension of
Tcl
TCL or Tcl or TCLs may refer to:
Business
* TCL Technology, a Chinese consumer electronics and appliance company
**TCL Electronics, a subsidiary of TCL Technology
* Texas Collegiate League, a collegiate baseball league
* Trade Centre Limited, a ...
created by David Wetherall at MIT (hence the name OTcl—short for MIT Object Tcl).
[OTcl Project Page]
/ref> It is used in network simulator (NS-2) and usually run under Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
environment.[Eitan Altman and Tania Jiménez]
NS Simulator for beginners
Lecture notes, 2003-2004, Univ. de Los Andres, Merida, Venezuela and ESSI, Sophia-Antipolis, France This was later extended into XOTcl.
OTcl may also refer to the unrelated IXI Object Tcl extension by Dean Sheenan.
These object Tcl extensions predate the more popular incr Tcl
incr Tcl (commonly stylised as ''ncr Tcl/nowiki>'', 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 str ...
.
Syntax Introduction
The reserved word ''Class'' is used to represent class and method of class are declared using word ''instproc''.[ The variable ''self'' is pointer to the class it is used in and is equivalent to variable ''this'' of C++/Java. The keyword ''-superclass'' is used for defining hierarchy.][ For example, ''Class Son -superclass Father'' means that ''class Son'' inherits from ''class Father''. To create an instance of class son we can write ''set new_inst ew Son'. Following is a simple example of code.
Class HelloWorld
HelloWorld instproc hello
set helloworld ew HelloWorld
//to run
$helloworld hello
]
TclCL
TclCL (Tcl with classes) is a Tcl/ C++ interface used by Mash, vic, vat, rtp_play, ns, and nam.
It provides a layer of C++ glue over OTcl.[TclCL Project Page]
/ref>
See also
* XOTcl
*incr Tcl
incr Tcl (commonly stylised as ''ncr Tcl/nowiki>'', 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 str ...
*Tcl
TCL or Tcl or TCLs may refer to:
Business
* TCL Technology, a Chinese consumer electronics and appliance company
**TCL Electronics, a subsidiary of TCL Technology
* Texas Collegiate League, a collegiate baseball league
* Trade Centre Limited, a ...
* Tcllib
*Itk
Itk is a framework for building mega-widgets using the Incr Tcl
incr Tcl (commonly stylised as '' ncr Tcl/nowiki>'', and often abbreviated to ''itcl'') is a set of object-oriented extensions for the Tcl programming language. It is widely us ...
* Tk
References
Object-oriented programming languages
{{compu-lang-stub