Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DAY 011: REM
#22
(11-16-2022, 11:13 PM)SMcNeill Wrote:
(11-16-2022, 11:04 PM)Pete Wrote: This oversight upsets the Continuity Principle.

Code: (Select All)
DATA "1,2,3" ' This doesn't works. IDE flags it.
DATA 1,2,3 ' This doesn't run, but the IDE doesn't flag it.

So when Rob put this together, he simply missed a condition. Since the IDE is set up to catch syntax errors before compilation, yes, this should at some point in time be corrected. In therms of priorities, things like this and the IF THEN ELSE anomaly are certainly backseat compared to a memory leak in SCREEN Zero. Oh the horror!!!!

Pete

The reason this isn't flagged by the IDE as an error, is simply because it's not.  Tongue

Code: (Select All)
For i = 1 To 4
    Read a$
    Print a$
Next

Data 1,2,3 ' This doesn't run,but the IDE doesn't flag it.

You've got mixed data inside your data stream there -- 2 numeric values and 2 string values.  The error you get, happens to be a run-time error because, at run-time, you're trying to read a string into a numeric variable.  

Makes perfect sense to me. Tongue

Ah, I forgot that DATA can be read as either a STRING type or Var Type. Good point!


Code: (Select All)
FOR i = 1 TO 3
    READ a
    PRINT a
NEXT

' Note the colon added is required for it to run.
DATA 1,2,3: REM This works as a var type or string type.

RESTORE

FOR i = 1 TO 3
    READ a$
    PRINT a$
NEXT

Also interesting that the RESERVED word REM can be used as a DATA element. So can the single quote.

I'll go back and edit post 11 accordingly.

Pete
Reply


Messages In This Thread
DAY 011: REM - by SMcNeill - 11-16-2022, 04:43 PM
RE: DAY 011: REM - by bplus - 11-16-2022, 05:25 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 05:48 PM
RE: DAY 011: REM - by CharlieJV - 11-16-2022, 06:04 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 06:21 PM
RE: DAY 011: REM - by mnrvovrfc - 11-16-2022, 06:20 PM
RE: DAY 011: REM - by TerryRitchie - 11-16-2022, 07:06 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 07:29 PM
RE: DAY 011: REM - by TerryRitchie - 11-16-2022, 07:47 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 08:44 PM
RE: DAY 011: REM - by CharlieJV - 11-16-2022, 10:00 PM
RE: DAY 011: REM - by bplus - 11-16-2022, 08:27 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 08:32 PM
RE: DAY 011: REM - by Jack - 11-16-2022, 08:37 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 09:20 PM
RE: DAY 011: REM - by mnrvovrfc - 11-16-2022, 10:22 PM
RE: DAY 011: REM - by Dav - 11-16-2022, 10:03 PM
RE: DAY 011: REM - by CharlieJV - 11-16-2022, 10:13 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 10:17 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 11:04 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 11:13 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 11:53 PM
RE: DAY 011: REM - by Dav - 11-17-2022, 12:45 AM
RE: DAY 011: REM - by CharlieJV - 11-17-2022, 01:01 AM
RE: DAY 011: REM - by mnrvovrfc - 11-17-2022, 01:20 AM
RE: DAY 011: REM - by SMcNeill - 11-17-2022, 12:59 AM
RE: DAY 011: REM - by Pete - 11-17-2022, 01:04 AM
RE: DAY 011: REM - by TerryRitchie - 11-17-2022, 02:02 AM
RE: DAY 011: REM - by Dav - 11-17-2022, 01:18 AM
RE: DAY 011: REM - by Pete - 11-17-2022, 01:23 AM
RE: DAY 011: REM - by Pete - 11-17-2022, 02:25 AM
RE: DAY 011: REM - by mnrvovrfc - 11-17-2022, 07:55 PM
RE: DAY 011: REM - by Pete - 11-17-2022, 08:26 PM
RE: DAY 011: REM - by bplus - 11-17-2022, 09:39 PM



Users browsing this thread: 8 Guest(s)