Repository navigation
No such variable at line ... #38
Description
Activity
This all seems to work quite well in a distilled example, so looks like something in the code is either causing issues with BBC BASIC for Z80 core, or my extensions are somehow causing issues.
Testing:
- Test the code works in BBC BASIC for Z80 on CP/M
- If that works, then it is a quirk of the code I'm missing.
The READ command seems to cause issues in the REPEAT/UNTIL. I will have to check this against the original CP/M version to determine whether this is a quirk of the original code or something that's broke since.
If it is a lingering defect in the original CP/M version and you are able to reliably fix it without breaking compatibility with existing software, you will be a hero. I believe something similar occurred during the realization of MEGA65 BASIC.
@breakintoprogram Another AgonLight customer informed me that the error goes away when you remove the REM statements from the end of the DATA statements. I confirmed that this is true. So it would appear that the issue may be somehow tied to additional BASIC commands being part of a DATA statement when the DATA is being READ in such a manner as it is in this program.
Reacted by breakintoprogramThanks - sorry it's taken me so long to get back on this. I'll keep this card open so I can further investigate as I test the agon-bbc-basic-adl.
Thanks @breakintoprogram. Question: Is Agon BBC Basic ADL ready for testing, and is it supposed to be backwards compatible with the original Agon BBC Basic? If so, the BIN I have of it does not appear to work with any of the BBC BASIC games I have developed which run on the original Agon BBC Basic.
Hi @tonedef71 no it is not ready for testing, there is (at time of writing) one outstanding issue with a stack imbalance. Yes it should be backwards compatible.
Hi @tonedef71 just an update to say that agon-bbc-basic-adl is now released and can be found here.
I am attaching a shorter BASIC program to use for investigating this issue: NoSuchVariable.zip
100 MODE 12:CLEAR:COLOUR 128:COLOUR 7:CLS 110 PROC_REDEFINE_CHARS 120 PRINT CHR$(130) 130 END 140 DEF PROC_REDEFINE_CHARS 150 LOCAL A%, I%, N% 160 N% = 0 170 REPEAT 180 READ A%:IF A% <> -1 THEN VDU 23, A%:FOR I% = 1 TO 8:READ A%:VDU A%:NEXT I%:N% = N% + 1:PRINT N% 190 UNTIL A% = -1 200 ENDPROC 210 REM THE :REM AT THE END OF A DATA LINE SEEMS TO BE WHAT IS RESPONSIBLE FOR THE ERROR 220 DATA 130,000,024,024,000,000,024,024,000: REM CHARACTER 130 230 DATA -1By the way, I noticed that if the
DATAline with theREMstatement simply ends with a colon character (i.e. remove the remainingREMstatement), then a "Syntax error at line 180" error message occurs instead (for the line with theREADstatement).
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsOn Hold
Load and run the example .BAS file. The message
No such variable at line 50010will be displayed.I'm not sure what is going wrong. Perhaps Agon BBC Basic gets confused when
READing DATA within aREPEAT/UNTILwithin a procedure after aREADof data was previously performed from a different procedure.