Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
another forum area for other platforms than zx-spectrum
#4
LCD it won't
LCD Wrote:BTW: removing DRAW and using DRAW() will break the 100% spectrum compatibility, so Sinclair Basic programs cannot be compiled anymore. Not that I think this is a bad idea... I also do not use line numbers (I hate them).

My idea is to keep DRAW and add a library LINE() or VECTOR() or DRAWTO(). Why to mimic their BASIC and not create one which is common for all the computers? I'm thinking about cross development. Incompatible commands will just cause a "Unsupported command" error.
That was not the idea :!:

The idea is allowing DRAW, INK, etc. to be defined as Subs (not part of the inner language), and allow subs to be called without parenthesis.
So:
Code:
SUB DRAW(unsigned x, unsigned y)
...
...
END SUB
could be called either with
Code:
DRAW(x, y): Rem Calling a SUB this way is already implemented
or this other way:
Code:
DRAW x, y: REM Calling a sub with no parenthesis (like Visual Basic)
This won't break ZX Spectrum BASIC compatibility, and will allow to take Spectrum-specific instructions out (the same way SCREEN$, ATTR and POINT are now).
Simply, when a user specifies --arch=sinclair (or whatever), a hidden #include <sinclair> is inserted in the code silently. Note: something like this is already done for SCREEN$, ATTR and POINT when higher ZX Spectrum compatibility is enabled.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)