Error in invoking tcl procedure

Moderator: GiD Team

Post Reply
amit12kd
Posts: 10
Joined: Thu Dec 04, 2014 2:58 pm

Error in invoking tcl procedure

Post 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
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Error in invoking tcl procedure

Post 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
Post Reply