Error in invoking tcl procedure
Posted: Thu Jul 02, 2015 10:17 am
Hi,
I am trying to invoke tcl procedure in my .bas file. When the return value from the tcl procedure is an integer, it works but it throws an error when the return value is a floating point number. For example, When I use the following in my .bas file:
*set var temp=2.1
*temp
*tcl(proc test { x } { return [expr $x*2] })*\
*Set var a=tcl(test *temp)
*a
it throws an error saying "Error into an *Operation expression in set var" which is the error in line where I invoke the tcl procedure.
However, when I change the value of temp to an integer, say 2, it works fine. That is, my .bas file looks like-
*set var temp=2
*temp
*tcl(proc test { x } { return [expr $x*2] })*\
*Set var a=tcl(test *temp)
*a
I don't quite understand why it is unable to handle floating point numbers, can someone help me figure out the issue here?
Thanks
I am trying to invoke tcl procedure in my .bas file. When the return value from the tcl procedure is an integer, it works but it throws an error when the return value is a floating point number. For example, When I use the following in my .bas file:
*set var temp=2.1
*temp
*tcl(proc test { x } { return [expr $x*2] })*\
*Set var a=tcl(test *temp)
*a
it throws an error saying "Error into an *Operation expression in set var" which is the error in line where I invoke the tcl procedure.
However, when I change the value of temp to an integer, say 2, it works fine. That is, my .bas file looks like-
*set var temp=2
*temp
*tcl(proc test { x } { return [expr $x*2] })*\
*Set var a=tcl(test *temp)
*a
I don't quite understand why it is unable to handle floating point numbers, can someone help me figure out the issue here?
Thanks