Shop OBEX P1 Docs P2 Docs Learn Events
backspace — Parallax Forums

backspace

Francis160791Francis160791 Posts: 28
edited 2013-10-18 01:40 in BASIC Stamp
may i know what is the code to do backspace ?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-10-17 22:26
    The ASCII backspace code is 8. You didn't say what display device you're using. Not all of them provide a backspace operation. Sometimes, if there is a backspace, it doesn't work the way you want it. If it just repositions the cursor or current display position, you may have to output a backspace, blank, and another backspace. It all depends.
  • Francis160791Francis160791 Posts: 28
    edited 2013-10-17 22:32
    how can i make backspace using this code ?

    IF IN12=0 THEN 'Cancel
    POLLIN 11, 1
    POLLIN 5, 1
    POLLMODE 2
    PAUSE 300
    counter=0
    DO
    counter=counter+1
    IF IN12 THEN
    PAUSE 50
    ELSE
    EXIT
    ENDIF
    LOOP UNTIL (counter=6)

    IF IN11=1 AND IN5=1 THEN
    SEROUT TX, Lcdbaud,[LcdCls,"Key in PIN",CR]
    DO
    IF IN12=0 THEN
    PAUSE 50
    ELSE
    EXIT
    ENDIF
    LOOP
    ENDIF
    ENDIF

    RETURN
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-10-17 22:38
    Welcome to the Forums. Double posting is not allowed. Please see your other thread and add to that one if necessary.
  • Francis160791Francis160791 Posts: 28
    edited 2013-10-17 22:47
    sorry about that.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-10-17 23:23
    Read the Product Guide for the display (like this one). It shows that the backspace code (8) will cause the cursor to move backwards one column (see page 7). To do what most people think of as a backspace, you may need to output 8 then " ", then 8 again like this:

    SEROUT TX, LcdBaud, [8, " ", 8]

    Read the documentation and experiment to get what you want.
  • Francis160791Francis160791 Posts: 28
    edited 2013-10-17 23:29
    but how i can add into my code ? cause there is a error when i add them up
  • Francis160791Francis160791 Posts: 28
    edited 2013-10-18 01:40
    thanks Mike Green. it work man :D:D:D:D !!!! thanks a lot !
Sign In or Register to comment.