Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/cpptcl/README @ 1214

Last change on this file since 1214 was 1214, checked in by landauf, 16 years ago

merged console-branch back to trunk.
IMPORTANT: update your media directory!

you need TCL to compile. TCL is available here: http://www.tcl.tk/
another option is to check out https://svn.orxonox.net/ogre/tcl8.5.2/ and compile it by yourself. makefiles are in the 'macosx', 'unix' and 'win' subfolders.
FindTCL.cmake searches in the usual locations and in ../libs/tcl8.5.2/

the orxonox console can be activated with numpad-enter. whatever you enter will be parsed by TCL. if TCL doesn't know a command, it gets executed by orxonox.

simple tcl commands are: "puts text" to write "text" into the console, "expr 1+1" to calculate the result of the given expression. just try it by yourself with "puts [expr 1+1]".
[x] means: evaluate x and use the returnvalue as an argument. in this case the returned value is "2" and the resulting command therefore "puts 2".

you can combine orxonox and tcl commands. a simple orxonox command is "log text" that writes text into the console and the logfile. test it with "log [expr 1+1]" to write "2" into all output channels of orxonox. something more advanced: "log [clock seconds]" writes the seconds since 1970 into the logfile. feel free to combine both: "log [clock seconds]: 1+1 is [expr 1+1]"

TCL uses variables. to set a new variable, use "set varname value". you can use the variable wherever you want with $varname. with this we can make the above command a bit more elegant:
set myexpression 1+1
log [clock seconds]: $myexpression is [expr $myexpression]

read more about tcl in the wiki: http://wiki.tcl.tk/

File size: 1014 bytes
Line 
1C++/Tcl - a C++ library for interoperability between C++ and Tcl.
2
3Copyright (C) 2004-2006, Maciej Sobczak
4
5---
6
7You should see the following directories here:
8
9- doc      - contains a short documentation for the library
10- examples - some simple examples to show C++/Tcl basics
11- test     - tests used for development - use them for regression testing
12             if you want to modify the library
13- details  - some additional code used by the library (not for client use)
14
15In addition, the following files may be of interest to you:
16
17- README   - this file
18- LICENSE  - explanation of the license terms
19- CHANGES  - the history of changes
20
21
22The C++/Tcl itself consists of these files:
23- cpptcl.h   - to be included in your own files
24- cpptcl.cc  - to be compiled and linked with your code
25
26
27In order to compile the tests and the examples you may need to change the
28compiler options to fit your particular environment (different paths to the
29Tcl headers and libs, another compiler, etc.)
30
31
32Anyway - have fun! :-)
Note: See TracBrowser for help on using the repository browser.