Tcl

TCL - examples
Login

Home

This directory is for Tcl newcomers.
Besides the mandatory Hello, world! program (both CLI and GUI), this directory contains a long list of examples.

There are also some examples with fnest in mind, such as parsing command-line arguments, executing external programs, such as ssh etc.

Hello, world!

Save this file as hello.tcl:

 #!/usr/bin/env tclsh

 puts {hello, world}

Enable execution and run:

chmod 755 hello.tcl
./hello.tcl

Hello, GUI!

Unix

On Unix, use the package manager to install Tk:

sudo apt install tk8.6
chmod 755 hello-gui-unix.tcl
./hello-gui-unix.tcl

MS Windows

On MS Windows, check that both Tcl and Tk are installed.

chmod 755 hello-gui-ms-windows.tcl
./hello-gui-ms-windows.tcl

fnest-example.tcl

This is a skeleton script for fnest.
It basically only supports only fnest CMD help and its alias fnest help CMD.

Links