I'm running an incarnation of tcl 8.5 that has been embedded into another system. That system will accept and correctly execute a command such as:
uniformDist minAndMax {1 10}
where uniformDist is some object to which I do not have internal visibility.
I want to be able to say something like:
set M 1000
uniformDist minAndMax {1 M}
but this does not work. Nor does set M 1000 uniformDist minAndMax {1 $M}
I tried:
u minAndMax {1 [eval $M]}
and
u minAndMax {1 [eval M]}
Neither of those works.
The error message is:
expected a real value: unable to convert from: "$M"Error: expected fewer arguments [Error while parsing pair]
or
expected a real value: unable to convert from: "[eval"Error: expected fewer arguments [Error while parsing pair]
What is the right way that tcl does this?