![](/images/new-backgrounds/1168297/168297155x1.webp)
nBackspace, delete, and cancel text
Backspace (CHR$(8)) “backs up” the printhead so that you can print two characters right on top of each other. Each time
Delete (CHR$(127)) also “backs up” one character, but then it “erases” the previous character (it’s erased from
Cancel text (CHR$(24)) deletes all the text in the print buffer; that is, in the line before the delete text command. Since
The following program shows how these three codes work.
-
NEW
10 LPRINT "BACKSPACE DOES NOT";
24)LPRINT CHRS(8) CHR$(8) CHR$(8); 3@ LPRINT 'I===WORK"
44)LPRINT "DELETE DOES NOT";
50 LPRINT CHR$(127) CHR$(127) CHR$(127); 60 LPRINT "WORK"
74)LPRINT "CANCEL TEXT";
80 LPRINT CHR$(24);
9@ LPRINT "DOES NOT PRINT"
Here is what this program will print:
PACKSF’ACE DOES WQT WORK
DELETE | DOES | WORK |
|
| |||
DOES | NOT | F'RINT |
|
| |||
The | backspace | codes in line 20 move the printhead a total of | _ | - | |||
three spaces to the left so that the first part of line 30 will overprint |
|
| |||||
the word “NOT”. The delete codes in line 50 ‘Lerase” the three |
|
| |||||
letters in the word “NOT” so that it doesn’t even print. |
|
| |||||
In line 80, CHR$(24) deletes the words in line 70. The semicolon |
|
| |||||
at the end of line 70 prevents a line feed from causing that line |
|
| |||||
to print before |
|
| |||||
in line 90 prints as it normally would because it is after CHR$(24). |
| - | |||||
|
|
|
|
|
|
| |
n | “Zero” |
| printing |
|
| ||
Sometimes. you want to print “zero” with slash to distinguish |
|
| |||||
between “0” and “0”. Your |
|
| |||||
“8” | as you |
| wish. |
|
|
|
70