At line 20594:4 fatal error in SBASIC interpreter
Re: At line 20594:4 fatal error in SBASIC interpreter
I do not understand the use of "DEVICE_STATUS", when all TK2 functions are available...? Any advantages?
7000 4E75
Re: At line 20594:4 fatal error in SBASIC interpreter
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?
TK2 sometimes does very odd things with its default devices - If you, for example, want to open "mdv1_test" on a machine without mdvs, instead of failing, it will happily create a file "mdv1_test" on the default device and make you think you can. write to a micro drive - DEVICE_STATUS ignores the default devices completely and just lets you aim more safely.
The fact that the default devices are global for all jobs doesn't make it any better (otherwise, you could reset them to empty temporarily and avoid this problem.)
It 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)
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: At line 20594:4 fatal error in SBASIC interpreter
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)
---------- snip ----------
V2.35
- Don't add default directory to names starting with a drive
---------- snap ----------
So, no more "flp1_mdv1_test". As I have written, this is the first time, where you can use "FTEST" in a real way.
7000 4E75
Re: At line 20594:4 fatal error in SBASIC interpreter
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?
http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX

Re: At line 20594:4 fatal error in SBASIC interpreter
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.
http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX
