Error in invoking tcl procedure

Moderator: GiD Team

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

Error in invoking tcl procedure

Postby amit12kd » 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
User avatar
escolano
Posts: 1660
Joined: Thu Sep 18, 2014 3:31 pm

Re: Error in invoking tcl procedure

Postby escolano » Thu Jul 02, 2015 12:03 pm

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.php?f=9&t=2660&p=7042&hilit=%2Atcl#p7042

Return to “Postprocess”

Who is online

Users browsing this forum: No registered users and 1 guest