Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21f63dcecaecc78

Jump to content

OTcl

From Wikipedia, the free encyclopedia

OTcl usually refers to an object oriented extension of Tcl created by David Wetherall at MIT (hence the name OTcl—short for MIT Object Tcl).[1] It is used in network simulator (NS-2) and usually run under Unix environment.[2] 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.

Syntax Introduction

[edit]

The reserved word Class is used to represent class and method of class are declared using word instproc.[2] 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.[2] 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 [new Son]. Following is a simple example of code.

 Class HelloWorld
 HelloWorld instproc hello {} {
 	puts "Hello world"
 }
 
 set helloworld [new HelloWorld]
 
 //to run
$helloworld hello

TclCL

[edit]

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.[3]

See also

[edit]

References

[edit]
  1. OTcl Project Page
  2. 1 2 3 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
  3. TclCL Project Page