RosettaCodeData/Task/Show-ASCII-table/Zkl/show-ascii-table.zkl
2023-07-01 13:44:08 -04:00

10 lines
423 B
Text

const width=9;
println(" ",[0..width].pump(String,"%4d".fmt));
[30..127].pump("".println,T(Void.Read,width,False), // don't fail on short lines
fcn(a,b,c){
String("%3d: ".fmt(a),
vm.arglist.pump(String,"toChar", // parameters (ints) to list to text
T("replace","\x1e",""),T("replace","\x1f",""), // 30,31
T("replace"," ","spc"),T("replace","\x7f","del"), "%-4s".fmt)
)
})