BBC BASIC for Windows
« DATA REM statements »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:53pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: DATA REM statements  (Read 877 times)
Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx DATA REM statements
« Thread started on: Oct 15th, 2014, 8:09pm »

Hi,

I'm sure this has come up before, but I can't find reference to it. Why does the REM statement after a DATA line not appear in the REM colour? (If it explains it in the help, then I'm losing it big time.)

Matt
User IP Logged

rtr2
Guest
xx Re: DATA REM statements
« Reply #1 on: Oct 15th, 2014, 8:44pm »

on Oct 15th, 2014, 8:09pm, Matt wrote:
Why does the REM statement after a DATA line not appear in the REM colour?

Because it isn't a REM! Run this program and all will be made clear:

Code:
      FOR I% = 1 TO 4
        READ A$
        PRINT A$
      NEXT

      DATA 1, 2 : REM
      DATA 3, 4 

The second data item is "2 : REM"!

Richard
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: DATA REM statements
« Reply #2 on: Oct 16th, 2014, 05:32am »

on Oct 15th, 2014, 8:44pm, g4bau wrote:
The second data item is "2 : REM"!

That's true. Yet it ignores it if you put the strings in quotes.
Code:
      FOR I% = 1 TO 4
        READ A$
        PRINT A$
      NEXT

      DATA "1", "2" : REM
      DATA "3", "4" 

User IP Logged

rtr2
Guest
xx Re: DATA REM statements
« Reply #3 on: Oct 16th, 2014, 07:11am »

on Oct 16th, 2014, 05:32am, Matt wrote:
That's true. Yet it ignores it if you put the strings in quotes.

But it's still not a REM! Try this:

Code:
      FOR I% = 1 TO 4
        READ A$
        PRINT A$
      NEXT

      DATA "1", "2" : MATT
      DATA "3", "4" 

If in doubt, examine the .BBC file with a hex editor: REM is &F4 whereas REM is &52 &45 &4D

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls