Jump to content
IGNORED

Extended Basic - Is this a Syntax Error or an Interpreter Bug?


kl99

Recommended Posts

Hi Guys,

yesterday I have run into a nasty Syntax Error in Extended Basic, which also occurs in RXB.

I don't understand it and wonder if the line really contains a Syntax Error or this is a Interpreter Bug.

 

Version 1:

1 IF A=1 THEN 2 ELSE FOR I=1 TO 2 :: PRINT I :: NEXT I
2 END

Version 2:

1 IF A=1 THEN 2 :: FOR I=1 TO 2 :: PRINT I :: NEXT I
2 END

 

Both versions complain about a Syntax Error in Line 1.

 

I would like to analyze it with the help of you and maybe RXB can be even fixed.

Edited by kl99
Link to comment
Share on other sites

I ran into this in the 10 line programming challenge. I think TI was being overcautious. By turning off prescan in line 95 the following runs as expected. 

90 A=2 :: I=1
95 !@P-
100 IF A=1 THEN 200 ELSE FOR I=1 TO 2 :: PRINT I :: NEXT I
200 PRINT "LINE 200"

But it's easy enough to fix this by breaking up the line:

100 IF A=1 THEN 200 
110 FOR I=1 TO 2 :: PRINT I :: NEXT I
200 PRINT "LINE 200"

 

 

 

  • Like 4
  • Thanks 1
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.
Note: Your post will require moderator approval before it will be visible.

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