The problem is that entry$() will return the backspace character. So when you press backspace the first time it removes the last character and adds a backspace character. then when you press backspace again it deletes the backspace character and adds another. You don't see it happen as the test command ignores backspace characters.
Here is a snippit that gets arround the problem by removing all the backspace characters from the string when the backspace key is pressed then removes the last character.
s$ = textbox(100,100)
cls
print s$
wait key
function textbox(x as integer,y as integer)
local out as string : local last_key as integer
clear entry buffer
repeat
cls
out = out + strip(entry$())
clear entry buffer
`backspace
if scancode() = 14 and last_key <> 14
if len(out) > 0
out = left$(out,len(out)-1)
endif
else
endif
last_key = scancode()
text x,y,out
text 0,0,str$(len(out))
until returnkey()
repeat : until returnkey() = 0
endfunction out
function strip(in as string)
`removes backspaces (chr$(8)) from in
local out as string : local i as integer
for i = 1 to len(in)
if asc(mid$(in, i)) <> 8 then out = out + mid$(in, i)
next i
endfunction out
PII 300 : 64mb ram : voodoo II 12mb : Win98