Jump to content
  • 0

Printing out characters -errant close brackets


BinaryMan
 Share

Question

4 answers to this question

Recommended Posts

  • 0
  • Super Administrators

When you print the quote symbol, it activates "control character mode", where cursor movements, colors, and so on, are printed in reverse text like you see above. 

The fix for this is to print a second quote, then DEL it, or you can print a return (don't put the comma at the end) and use LOCATE to position the cursor each time through the loop. 

DEL should be 20, so you can try something like this...

PRINT CHR$(X+Y);CHR$(X+Y);CHR$(20),

Here's a complete program that uses this:
10 CLS
20 C=32
30 FOR Y=1 TO 16
40 FOR X=1 TO 70 STEP 8
60 IF C<100 THEN PRINT" ";
70 PRINT C;CHR$(C);CHR$(C);CHR$(20);"  ";
80 C=C+1:IF C>127 THEN END
90 NEXT X
100 PRINT
110 NEXT Y

And here's a program that uses LOCATE:

10 CLS
20 C=32
30 FOR Y=1 TO 16
40 FOR X=1 TO 70 STEP 8
50 LOCATE Y,X
60 IF C<100 THEN PRINT" ";
70 PRINT C;CHR$(C);
80 C=C+1:IF C>127 THEN PRINT:END
90 NEXT X,Y

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use