35 lines
759 B
Plaintext
35 lines
759 B
Plaintext
// Prints ASCII table
|
|
// Note changing the values of startChar and endChar will print
|
|
// a flexible table in that range
|
|
|
|
startChar = 32
|
|
endChar = 127
|
|
characters = []
|
|
|
|
for i in range(startChar, endChar)
|
|
addString = char(i) + " "
|
|
if i == 32 then addString = "SPC"
|
|
if i == 127 then addString = "DEL"
|
|
characters.push addString
|
|
end for
|
|
|
|
for i in characters.indexes
|
|
iNum = i + startChar
|
|
iChar = " " + str(iNum)
|
|
characters[i] = iChar[-5:] + " : " + characters[i]
|
|
end for
|
|
|
|
columns = 6
|
|
line = ""
|
|
col = 0
|
|
for out in characters
|
|
col = col + 1
|
|
line = line + out
|
|
if col == columns then
|
|
print line
|
|
line = ""
|
|
col = 0
|
|
end if
|
|
end for
|
|
if line then print line // final check for odd incomplete line output
|