Page 1 of 1

Error in invoking tcl procedure

Posted: Thu Jul 02, 2015 10:17 am
by amit12kd
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

Re: Error in invoking tcl procedure

Posted: Thu Jul 02, 2015 12:03 pm
by escolano
It was an error fixed in latest GiD versions. Download the last official or developer version

Exactly the same question was asked some months ago, this was the answer:
http://www.gidhome.com/forum/viewtopic. ... Atcl#p7042