Older Version Newer Version

alexbarfoot alexbarfoot Jan 12, 2006

This code below demonstrates how to remove a character from a string by type of character:


[reenter]
print "Type in a string and press ENTER."
input a$
print "string:";a$
let s=len(a$)
print "string length:";s
[loop]
print "Type the figure you wish to remove from string and press ENTER."
input num$
n = instr(a$,num$)
if n=0 then goto [figurenot]
a$= left$(a$,n-1) + right$(a$, s-n)
let s=len(a$)
print "string length:";s
print a$
if s<1 then goto [aromved]
goto [loop]
wait
[aromved]
print "all figures removed from string"
goto [reenter]
wait
[figurenot]
print "figure does not exsist"
goto [loop]
wait