Browse Source

repl - avoid unnecessary string rep conversion to aid analysis using tcl::unsupported::representation

master
Julian Noble 2 years ago
parent
commit
e30e834bf8
  1. 11
      src/punk86.vfs/lib/app-punk/repl.tcl

11
src/punk86.vfs/lib/app-punk/repl.tcl

@ -1040,8 +1040,19 @@ proc repl::repl_handler {inputchan prompt_config} {
}
} else {
#-----------------------------------------------------------
# avoid repl forcing string rep of simple results. This is just to aid analysis using tcl::unsupported::representation
set rparts [split $result {}]
if {[lsearch $rparts \n] < 0} {
#type of $result unaffected
rputs "$resultprompt $result"
} else {
#$result will be a string due to use of string map
rputs $resultprompt[string map [list \n "\n$resultprompt"] $result]
}
#-----------------------------------------------------------
#rputs $resultprompt[string map [list \n "\n$resultprompt"] $result]
}
doprompt "P% "
} else {
#tcl err

Loading…
Cancel
Save