Re: At line 20594:4 fatal error in SBASIC interpreter
Posted: Mon Feb 17, 2025 5:14 pm
I do not understand the use of "DEVICE_STATUS", when all TK2 functions are available...? Any advantages?
RIP Sir Clive Sinclair 1940 - 2021
https://theqlforum.com/
I think I can guess why:RalfR wrote: Mon Feb 17, 2025 5:14 pm I do not understand the use of "DEVICE_STATUS", when all TK2 functions are available...? Any advantages?
Yes, that's the problem I mentioned recently. But Marcel has changed it in the current version so that it checks whether the first part of the file name is also a valid device.tofro wrote: Mon Feb 17, 2025 10:27 pmIt would improve things a lot when TK2 would check whether the first part of a file name is a valid device name and not apply this mechanism (i.e. recognize this is an absolute path and treat it as such)
I think DEVICE_STATUS() is more powerful than FTEST(). I assume Simon needed such a powerful file test function when writing SuperCharge and Turbo. In my function I should use DEVICE_STATUS(2, ...) instead of DEVICE_STATUS(1, ...) and there is also DEVICE_STATUS(-1, ...). The other advantage is, that it does not use the DATAD$ directory.RalfR wrote: Mon Feb 17, 2025 5:14 pm I do not understand the use of "DEVICE_STATUS", when all TK2 functions are available...? Any advantages?
Thank you Ralf. This is what I have assumed in my starting thread (WHEN ERRor), but I thought because of the trailing % it's another name.RalfR wrote: Mon Feb 17, 2025 6:23 am This will happen for all variables that match the capitalized part of QDOS' own keywords, e.g.:
RETurn, ERRor, PROCedure, FuNction, REPeat, DEFine etc.
I think because these are all no normal SuperBASIC MC procedures/functions, but real keyword which have direct effects on the SuperBASIC program (like e.g. REPeat). I assume it's not possible to write a SuperBASIC MC procedure which does similar as REPeat or WHEN ERRor. GO TO is another example, if you write GOTO it will be expanded to GO TO.For a procedure or function it is enough to simply write "def proc" or "def fn" in ED. Interestingly, this only works with QDOS's own commands, not with loaded toolkits.