updated listing/saving algos
This commit is contained in:
@@ -245,8 +245,8 @@ proc lttb_EN {stmt} {
|
||||
|
||||
proc int_LIST {} {
|
||||
global progmem
|
||||
loop i 1 32768 {
|
||||
if {[dict exists $progmem $i] && [string length $progmem($i)]} {
|
||||
foreach i [lsort -integer [dict keys $progmem]] {
|
||||
if {$progmem($i) ne {}} {
|
||||
puts [format "%d\t%s" $i $progmem($i)]
|
||||
}
|
||||
}
|
||||
@@ -292,8 +292,8 @@ proc int_SAVE {} {
|
||||
stdout flush
|
||||
stdin gets fname
|
||||
set fh [open $fname w]
|
||||
loop i 1 32768 {
|
||||
if {[dict exists $progmem $i]} {
|
||||
foreach i [lsort -integer [dict keys $progmem]] {
|
||||
if {$progmem($i) ne {}} {
|
||||
$fh puts [format {%d %s} $i $progmem($i)]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user