updated listing/saving algos

This commit is contained in:
Luxferre
2026-06-14 09:28:29 +03:00
parent 48c63cac8f
commit 910159f7ab
2 changed files with 16 additions and 9 deletions
+4 -4
View File
@@ -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)]
}
}