Nice trick, BUT VERY BAD ON A MULTITASKING (better Multithreading) system. If the sheduler switches to another job, after SV_DDLST has been set to 0 and this job will open a directory device file, it will fail.RalfR wrote: In Sedit, I always saved SV_DDLST and set that to "0" so the TK2 default directories does not use them, as I want to find the real path. After that, I patched the var to its original state.
QL Tinkering
Re: QL Tinkering
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: QL Tinkering
Well it is just a tick of a second, I usually do not use file manipulations, loading or saving in multitasking. 
I also never use the TK2 default diectories as you are sometimes not sure, where you are. It can be more worse, if you also use the DEV mechanism.

I also never use the TK2 default diectories as you are sometimes not sure, where you are. It can be more worse, if you also use the DEV mechanism.
7000 4E75
Re: QL Tinkering
The problem is if you have a program which programmatically opens a file/files (e.g. on RAM-disk) automatically very often (e.g.) in a loop. Such types of programs may fail.
But you are right that the implementation of default directories in SB is error prone :-(
A solution would be, if we had a kind of locking (as e.g. in C#, wonderful language BTW) in SB, than you could set a lock (preventing the scheduler to switch to another job), set DDLST to 0, open the file and release the lock.
A simpler solution would be a file open function which ignores the default directories. Isn't there an implementation in TurboToolkit, it's now free and IMO TurboToolkit should AS TK2 ALWAYs be loaded. There are a lot of useful programs requiring TurboToolkit, e.g. "The Editor" (still the only one AFAIK which supports column blocks - sometimes VERY useful).
But you are right that the implementation of default directories in SB is error prone :-(
A solution would be, if we had a kind of locking (as e.g. in C#, wonderful language BTW) in SB, than you could set a lock (preventing the scheduler to switch to another job), set DDLST to 0, open the file and release the lock.
A simpler solution would be a file open function which ignores the default directories. Isn't there an implementation in TurboToolkit, it's now free and IMO TurboToolkit should AS TK2 ALWAYs be loaded. There are a lot of useful programs requiring TurboToolkit, e.g. "The Editor" (still the only one AFAIK which supports column blocks - sometimes VERY useful).
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: QL Tinkering
@RalfR: BTW, is this (SU QL 1) your real KFZ-Kennzeichen?
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: QL Tinkering
The question I asked elsewhere: Does DEVICE_STATUS bypass the TK2 default directories? To say in DP things: YES. But I do not know. As noone has complained my way, this seems to be ok. I do not think, that you do several I/O things during loading a file in an editor
.
I even wish to find a way, to make all the TK2 Fxxx functions work without these grmpf... directories. They may be good from the command line, but no good in programs. Do you really want them to look for win1_flp1_myfile? I think, not.

I even wish to find a way, to make all the TK2 Fxxx functions work without these grmpf... directories. They may be good from the command line, but no good in programs. Do you really want them to look for win1_flp1_myfile? I think, not.
Last edited by RalfR on Fri May 29, 2020 7:06 pm, edited 2 times in total.
7000 4E75
Re: QL Tinkering
Yesql_freak wrote:@RalfR: BTW, is this (SU QL 1) your real KFZ-Kennzeichen?

7000 4E75
Re: QL Tinkering
Sorry, this doesn't matter(!). Assume you are unzipping a very large ZIP archive (perhaps over a network connection) and in the meantime you want to edit other files. If you then open a file in the editor and the sheduler switches to UNZIP when the editor has set SV.DDLST to 0, but NOT opened the file, and at the same time UNZIP needs to open a new file for unzipping, UNZIP will fail.RalfR wrote:Well it is just a tick of a second, I usually do not use file manipulations, loading or saving in multitasking. :D
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: QL Tinkering
Hi,
Seems work is picking up, I have some books to edit and Web site pages to review, so I guess less time to spend on QL SuperBASIC.
I shall return and keep track when I can of events transpiring.
I’ve uploaded QBITS Organiser v03 some small changes to try to suite the various platforms running S/SuperBASIC.
As a minimum you will need extended memory and TKII.
For operation BBQL speed is going to be slow so any multiple increases with other platforms will be an asset.
If you find any problems hopefully the pdf explanation will be enough for you to reach a solution, any of which I and others no doubt will be interested in.
All the best to you my premise being to encourage and extend the life and use of QL S/SuperBASIC.
QBIITS
Seems work is picking up, I have some books to edit and Web site pages to review, so I guess less time to spend on QL SuperBASIC.
I shall return and keep track when I can of events transpiring.
I’ve uploaded QBITS Organiser v03 some small changes to try to suite the various platforms running S/SuperBASIC.
As a minimum you will need extended memory and TKII.
For operation BBQL speed is going to be slow so any multiple increases with other platforms will be an asset.
If you find any problems hopefully the pdf explanation will be enough for you to reach a solution, any of which I and others no doubt will be interested in.
All the best to you my premise being to encourage and extend the life and use of QL S/SuperBASIC.
QBIITS
- Attachments
-
- QBOrg_v03.zip
- (14.29 KiB) Downloaded 261 times
-
- QBOrganiser_v03_compressed.pdf
- (1.81 MiB) Downloaded 278 times
Re: QL Tinkering
Hi All,
Another year has nearly passed, eventful yes, but not in the way any of us would have wished. Few visits and the prospects of self-imposed restraints on any family gathering has left this year’s Christmas full of Zoom.
The last few months with the pressure off I haven’t been totally idle, back to my S/SuperBASIC I present a QBITS early don’t miss Black Friday offer to download. ‘QBITS Pandemic’ free of any charge of course or royalty issues. And I can hear you all saying I just knew it, someone was bound to get around to rolling out such a Prog for the QL.
Well enjoy!
QBITS
Another year has nearly passed, eventful yes, but not in the way any of us would have wished. Few visits and the prospects of self-imposed restraints on any family gathering has left this year’s Christmas full of Zoom.
The last few months with the pressure off I haven’t been totally idle, back to my S/SuperBASIC I present a QBITS early don’t miss Black Friday offer to download. ‘QBITS Pandemic’ free of any charge of course or royalty issues. And I can hear you all saying I just knew it, someone was bound to get around to rolling out such a Prog for the QL.
Well enjoy!
QBITS
- Attachments
-
- QBPandemic2020.pdf
- (1.25 MiB) Downloaded 334 times
-
- QBPandemic_v01BBQL.zip
- (12.95 KiB) Downloaded 225 times
- vanpeebles
- Commissario Pebbli
- Posts: 2850
- Joined: Sat Nov 20, 2010 7:13 pm
- Location: North East UK