(2)proc to_eng: return arg as is if not valid expression

This commit is contained in:
stefan schippers 2025-02-26 19:33:14 +01:00
parent 2d6b7c4fe1
commit c19c25873b
1 changed files with 4 additions and 0 deletions

View File

@ -628,6 +628,10 @@ proc from_eng {i} {
## convert number to engineering form
proc to_eng {args} {
set suffix {}
if {[ catch {uplevel #0 expr [join $args]} i]} {
return [join $args]
}
set i [uplevel #0 expr [join $args]]
set absi [expr {abs($i)}]