HOME

TheInfoList



OR:

OTcl usually refers to an
object oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
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 ...
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, multi-user 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, a ...
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 XOTcl is an object-oriented extension for the Tcl, Tool Command Language created by Gustaf Neumann and Uwe Zdun. It is a derivative of MIT OTcl and is based on a dynamic object system with metaclasses influenced by CLOS. Class (computer science), ...
. 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 Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (ca ...
.


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 XOTcl is an object-oriented extension for the Tcl, Tool Command Language created by Gustaf Neumann and Uwe Zdun. It is a derivative of MIT OTcl and is based on a dynamic object system with metaclasses influenced by CLOS. Class (computer science), ...
*
incr Tcl incr Tcl (commonly stylised as '' ncr Tcl/nowiki>'', and often abbreviated to ''itcl'') is a set of object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (ca ...
*
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 ...
*
Tcllib 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 ...
*Itk * Tk


References

Object-oriented programming languages {{compu-lang-stub