tcl2c++(1)

tcl2c++1

Converts tcl scripts into a c++ static character array

Usage

tcl2c++ name [file ...]

Overview

tcl2c++ convert the script into an EmbeddedTcl object.

The lines below expand ns-lib.tcl and create the EmbeddedTcl object instance called et_ns_lib:

tclsh bin/tcl-expand.tcl tcl/lib/ns-lib.tcl | \
../Tcl/tcl2c++ et_ns_lib > gen/ns_tcl.cc

The script, ~ns/bin/tcl-expand.tcl expands ns-lib.tcl by replacing all source lines with the corresponding source files.

The program, ~tclcl/tcl2cc.c, converts the OTcl code into an equivalent EmbeddedTcl object, et_ns_lib.

During initialization, invoking the method EmbeddedTcl::load explicitly evaluates the array.
— ~tclcl/tcl-object.tcl is evaluated by the method Tcl::init(void);
Tcl_AppInit() invokes Tcl::Init(). The exact command syntax for the
load is:
et_tclobject.load();

— Similarly, ~ns/tcl/lib/ns-lib.tcl is evaluated directly by
Tcl_AppInit in ~ns/ns_tclsh.cc.
et_ns_lib.load();

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0
  2. 7–13

Author

YunQiang Su <[email protected]>

From tclcl 1.20-13 in Debian 13 (Trixie). Parsed by carta from the page's man source.