bradmoore
Jan 12, 2006
This code below demonstrates how to remove a character from a string by type of character: string:
'this is a simple code sample that demonstartes how to
'remove a character from the string. A null string exits the loop
'modified by BJ Moore
[reenter]"Type"Type in a string and pressENTER."ENTER."
input a$"string:";a$"string:";a$
let s=len(a$)
if s = 0 then end"string length:";s"string length:";s
[loop]"Type"Type thefigurecharacter you wish to remove from string and pressENTER."ENTER."
input num$
if len(num$) = 0 then end
n = instr(a$,num$)
if n=0 then goto [figurenot]
a$= left$(a$,n-1) + right$(a$, s-n)
let s=len(a$)"string length:";s"string length:";s
print a$
if s<1 then goto [aromved]
goto [loop]
wait[aromved]"all"all figures removed fromstring"string"
goto [reenter]
wait[figurenot]"figure"figure does notexsist"exsist"
goto [loop]wait