The problem is the extensive use of the {} - characters. Something like this works perfectly
Code: Select all
proc rand (n) {
expr {int($n*rand())}
}
It might be difficult to make this work in a future version, but I'll look into it. Maybe some simple option to ignore the first {} pair after the proc statement.