Posted to tcl by Rothgar at Mon Dec 10 13:39:57 GMT 2007view raw
- # Constants
- set ::constants [list]
- # Constant Handling
- rename proc _proc
- _proc const {name value} {
- global constants;
- lappend constants $name $value;
- }
- _proc proc {name argpat body} {
- global constants;
- _proc $name $argpat [string map $constants $body];
- }
- const STRING_MAX_LEN 400;
- proc test {nick arg} {
- putlog "TEST: $STRING_MAX_LEN";
- }