Hi all,
i'm having a problem using *tcl in my .bas files. GiD raises an error whenever the return value of my tcl function is not an integer. This is also true for the example program:
*tcl(proc MultiplyByTwo { x } { return [expr {$x*2}] })
*Set var a=tcl(MultiplyByTwo *p1)
(given in http://www.gidhome.com/component/manual ... c_commands)
If *p1 is not an integer but a real like 0.2 GiD raises an error ("Error into an *Operation expression in set var").
Seems like an odd error since the manual states that the return value from *tcl has to be "a numerical result".
Greetings
*tcl in .bas
Moderator: GiD Team
Re: *tcl in .bas
The value of a *tcl command inside the .bas file in not compulsory a numerical value. It could be a string value to be printed to the calculation file.
it must be a numerical value if it is assigned to a .bas variable, because these variables nowadays could be only integer or real, but not string.
In this case the problem is because a internal GiD bug: the result of the Tcl operation was volatile and when trying to convert to a real value is has been deleted.
We have fixed it for next GiD developer version 12.1.3d (that will be available for download this week) and for next offical version 12.0.5.
Thanks for your bug report.
it must be a numerical value if it is assigned to a .bas variable, because these variables nowadays could be only integer or real, but not string.
In this case the problem is because a internal GiD bug: the result of the Tcl operation was volatile and when trying to convert to a real value is has been deleted.
We have fixed it for next GiD developer version 12.1.3d (that will be available for download this week) and for next offical version 12.0.5.
Thanks for your bug report.