Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
34
Task/Show-ASCII-table/MiniScript/show-ascii-table.mini
Normal file
34
Task/Show-ASCII-table/MiniScript/show-ascii-table.mini
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue