| 
 
| 
|  Author | Topic: DATA REM statements  (Read 878 times) |  |  
| 
| 
| Matt Developer
 
 member is offline
 
  
 
 
 
 
  
 Gender:
  Posts: 210
 
 | 
|  | 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
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| rtr2 Guest
 
 | 
|  | 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
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| Matt Developer
 
 member is offline
 
  
 
 
 
 
  
 Gender:
  Posts: 210
 
 | 
|  | 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" 
 |  
| 
|  |  Logged |  
 |  |  |  
| 
| 
| rtr2 Guest
 
 | 
|  | 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.
 |  
| 
|  |  Logged |  
 |  |  |  
 |