Calling report_check_types when compiled with Tcl 9 results in an issue reading the sta::float_inf variable.
Let's consider the following foo.tcl
cat ~/foo.tcl
proc hello {} {
# Accessing vars from within proc
puts "Tcl patchlevel = $::tcl_patchLevel"
puts "sta::float_inf = $sta::float_inf"
}
hello
report_check_types
Calling this with a Tcl8-linked sta, we can see that we can access $sta::float_inf as expected within a proc, and calling report_check_types emits some error as expected
cat ~/foo.tcl | build-8/sta -no_splash
Tcl patchlevel = 8.5.19
sta::float_inf = 1.0000000150474662e+30
Error: 1571 No network has been linked.
However, compiled with tcl 9 there is a strange error from within report_check_types as it can't access the variable, while our little hello test proc can see and access it.
$ cat ~/foo.tcl | build-9/sta -no_splash
Tcl patchlevel = 9.0.3
sta::float_inf = 1.0000000150474662e+30
can't read "sta::float_inf": no such variable
Unclear the reason to me right now.
Some different way Tcl 9 handles variables outside the current scope compared to Tcl 8.x ?
Some swig issue (using SWIG Version 4.3.1) ?
proc_redirect confusing Tcl 9 ?
Bug in Tcl 9 ?
Calling
report_check_typeswhen compiled with Tcl 9 results in an issue reading thesta::float_infvariable.Let's consider the following
foo.tclCalling this with a Tcl8-linked sta, we can see that we can access
$sta::float_infas expected within a proc, and callingreport_check_typesemits some error as expectedHowever, compiled with tcl 9 there is a strange error from within
report_check_typesas it can't access the variable, while our littlehellotest proc can see and access it.Unclear the reason to me right now.
Some different way Tcl 9 handles variables outside the current scope compared to Tcl 8.x ?
Some swig issue (using
SWIG Version 4.3.1) ?proc_redirectconfusing Tcl 9 ?Bug in Tcl 9 ?