
TCL-Programs Reference Manual
Contents
Miscellaneous Command
These are miscellaneous commands
Miscellaneous Command Reference
debug <text1> [text2 ... textn]
Generates a debug message for each text visible in the
TCL-DEBUG wiznet channel and in the log.
directionname <number>
Returns the names of the exists represented with the numbers:
0 | north |
1 | south |
2 | east |
3 | west |
4 | up |
5 | down |
random <lower> <upper>
With the random command you can simply generate a random number.
Returns a random value, default lower=0 default upper=99
Examples:
random | Generates a random number between 0 and 99 |
random 9 | Generates a random number between 0 and 9 |
random 10 20 | Generates a random number between 10 and 20 |
strchangecost [-insert <cost>]
[-remove <cost>]
[-replace <cost>]
<text1> <text2>
Calculates the cost of changing text1 into text2. Default all
costs are 1. Examples:
strchangecost 'test test' 'testtext' | 2 (one remove and one replace) |
strchangecost -replace 2 'test test' 'testtext' | 3 (idem but the replace is more expensive) |
strchangecost -replace 3 'test test' 'testtext' | 3 (in this case it is cheaper to insert&remove instead of replace) |
strformat <text>
performs line wrapping on text and ensures the
text ends with in a newline.
|