37 lines
888 B
Text
37 lines
888 B
Text
all$ =""
|
|
for i =0 to 255
|
|
all$ =all$ +chr$( i)
|
|
next i
|
|
|
|
print "Original string of bytes. ( chr$( 10) causes a CRLF.)"
|
|
print all$
|
|
print
|
|
|
|
lessControl$ =controlStripped$( all$)
|
|
print "With control codes stripped out."
|
|
print lessControl$
|
|
print
|
|
|
|
lessExtendedAndControl$ =extendedStripped$( lessControl$)
|
|
print "With extended codes stripped out too."
|
|
print lessExtendedAndControl$
|
|
|
|
end
|
|
|
|
function controlStripped$( i$)
|
|
r$ =""
|
|
for j =1 to len( i$)
|
|
ch$ =mid$( i$, j, 1)
|
|
if asc( ch$) >=32 then r$ =r$ +ch$
|
|
next j
|
|
controlStripped$ =r$
|
|
end function
|
|
|
|
function extendedStripped$( i$)
|
|
r$ =""
|
|
for j =1 to len( i$)
|
|
ch$ =mid$( i$, j, 1)
|
|
if asc( ch$) <=128 then r$ =r$ +ch$
|
|
next j
|
|
extendedStripped$ =r$
|
|
end function
|