Jump to content
OLD CS1

Extended BASIC automatic "word wrap"?

Recommended Posts

Interesting thing I stumbled upon, and forgive me if this is already a known feature.

 

Take this

10 A$="/--+"
11 B$="|  |"
12 c$="+--/"
13 FOR I=1 TO 6
14 PRINT "**";RPT$(A$,6);"##1*";RPT$(B$,6);"#12*";RPT$(B$,6);"#2**";RPT$(C$,6);"##";
15 NEXT I
16 GOTO 16

The markers on the side are not printed with the first two characters "##" on the first line, then the next two characters "1*" on the next line, &c., but rather all four on the next line.

 

Clipboard01.thumb.png.22b2e97e5f3b7e3d0446ba7169aa46e5.png

 

 

Change line 14 to

14 PRINT "**";RPT$(A$,6);"##";"1*";RPT$(B$,6);"#1";"2*";RPT$(B$,6);"#2";"**";RPT$(C$,6);"**";

And the output is as expected.

 

Clipboard02.thumb.png.3f27ad61cc7260beceb7f5e0127e6bd2.png

 

  • Like 4

Share this post


Link to post
Share on other sites

I considered this could have been related to the use of RPT$ in the PRINT statement, and tested by assigning A$, B$, and C$ using RPT$ then using the variables in PRINT.  The result was the same.

Share this post


Link to post
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
Reply to this topic...

×   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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...