
-----------------------------------
CyCLoBoT
Tue Feb 11, 2003 4:14 pm

Only Numbers
-----------------------------------
How can I restrict in Turing so that the user can only enter numbers? Also the user can use backspace as well

Thanks

-----------------------------------
Catalyst
Tue Feb 11, 2003 5:18 pm


-----------------------------------

var dir : string (1)
loop
    getch (dir)
    if index ("0123456789", dir) not= 0 or dir=chr(8) then
        put dir ..
    end if
end loop


-----------------------------------
CyCLoBoT
Tue Feb 11, 2003 5:40 pm


-----------------------------------
This is exactly what I wanted. Thanks for your help Catalyst  :)
