====== Getting started with Tcl ====== This page is part of the Airplug documentation.\\ [[en:doc:summary|Back to the Airplug documentation page]] / [[en:doc:start|Back to the Airplug resources page]] --- Some of our applications have been developed in Tcl/Tk to ease the adaption for Network Simulator ns-2, composed with a hierarchy of C++ classes and OTcl classes (object tcl). Our Airplug-ns add-on for ns-2 allows to reuse code developed for the road or the emulation into the simulator. Other languages can be used however for developing applications. Here, you will find some tips for developing in Tcl. ===== A selection of external links related to Tcl/Tk ===== * [[http://fr.wikipedia.org/wiki/Tool_Command_Language|Tcl page in the French Wikipedia]]: very good to discover the langage. * [[http://en.wikipedia.org/wiki/Tcl|Tcl page in the English Wikipedia]] * [[http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html|A tutorial for tcl 8.5 on tcl.tk]] * [[http://www.tkdocs.com/tutorial/index.html|Another tutorial on tkdocs.com]] * [[http://www.tcl.tk/man/tcl8.5/|Man pages for tcl 8.5 on tcl.tk]] * [[http://wiki.tcl.tk/11483|Getting started on wiki.tcl.tk]] ===== Our Tcl quick start ===== To quickly start in Tcl, we prepared some examples: * [[en:doc:pub:tcltk:install|Installing Tcl and Tk]] * [[en:doc:pub:tcltk:example-01|Example 1]]: first script, comment, printing and special characters * [[en:doc:pub:tcltk:example-02|Example 2]]: variables * [[en:doc:pub:tcltk:example-03|Example 3]]: substitutions, " vs. { * [[en:doc:pub:tcltk:example-04|Example 4]]: using Tcl functions * [[en:doc:pub:tcltk:example-05|Example 5]]: arrays, for, foreach * [[en:doc:pub:tcltk:example-06|Example 6]]: lists, for, foreach (see also Example 13) * [[en:doc:pub:tcltk:example-07|Example 7]]: procedures, while * [[en:doc:pub:tcltk:example-08|Example 8]]: relation with the environment, command line * [[en:doc:pub:tcltk:example-09|Example 9]]: lists vs. strings * [[en:doc:pub:tcltk:example-10|Example 10]]: arrays vs. strings * [[en:doc:pub:tcltk:example-11|Example 11]]: errors * [[en:doc:pub:tcltk:example-12|Example 12]]: upvar for passing arguments as references * [[en:doc:pub:tcltk:example-13|Example 13]]: how to scan a Tcl array * [[en:doc:pub:tcltk:example-14|Example 14]]: how to sort a list ===== Tips from and for our Tcl/Tk developers ===== You had a difficulty with Tcl or Tk and you found a solution? This may interest others. Please let us know and we will add here. * [[en:doc:pub:tcltk:tips:syntax|Tips regarding syntax]] * [[en:doc:pub:tcltk:tips:lists|Tips for Tcl lists]] * [[en:doc:pub:tcltk:tips:afterlocvar|How to use a local variable in a after command]] * [[en:doc:pub:tcltk:tips:buttonlocvar|How to use a local variable in a button command]] * [[en:doc:pub:tcltk:tips:sortingarray|Sorting an array]] * [[en:doc:pub:tcltk:tips:switch|About switch]] * [[en:doc:pub:tcltk:tips:concat|String concatenation]] * [[en:doc:pub:tcltk:tips:unsetarray|About unsetting an array]]
---- This page is part of the Airplug documentation.\\ [[en:doc:summary|Back to the Airplug documentation page]] / [[en:doc:start|Back to the Airplug resources page]]