Re: [Ql-Users] SBASIC interpreter bug?

2022-11-24 Thread François Van Emelen via Ql-Users
Op 23/11/2022 om 16:40 schreef pjwitte via Ql-Users: On 23/11/2022 14:51, François Van Emelen via Ql-Users wrote: Op 22/11/2022 om 13:26 schreef pjwitte via Ql-Users: Does anyone know whats going on here? <> Could this solve your problem? 100 ch = FOPEN("con"): CLS#ch 110 test ch, 25 120

Re: [Ql-Users] SBASIC interpreter bug?

2022-11-23 Thread pjwitte via Ql-Users
On 23/11/2022 14:51, François Van Emelen via Ql-Users wrote: Op 22/11/2022 om 13:26 schreef pjwitte via Ql-Users: Does anyone know whats going on here? <> Could this solve your problem? 100 ch = FOPEN("con"): CLS#ch 110 test ch, 25 120 print#ch,"hit a key to stop" :PAUSE#ch,-1 130 CLOSE#ch

Re: [Ql-Users] SBASIC interpreter bug?

2022-11-23 Thread Wolfgang Lenerz via Ql-Users
Hi, Per wrote: > Perhaps you didnt EX it? If you RUN it it may work, although a > differently constructed (more complex) version would also fail. I didn't ex it, just ran it - the problem was already seen under an SBasic daughter job. Derek wrote: It looks like the variable for the FOPEN

Re: [Ql-Users] SBASIC interpreter bug?

2022-11-23 Thread Derek via Ql-Users
Hi I changed the ch in the FOPEN variable to chan and it worked with EX, SBAS. It looks like the variable for the FOPEN parameter is getting mixed up with the parameter on the Procedure parameter. I also tried the original program on Minerva with MultiBasic executing the program with: EX

Re: [Ql-Users] SBASIC interpreter bug?

2022-11-23 Thread François Van Emelen via Ql-Users
Op 22/11/2022 om 13:26 schreef pjwitte via Ql-Users: Does anyone know whats going on here? SBASIC only: EXecute the following program: 100 ch = FOPEN("con"): CLS#ch 110 test ch, 1 120 PAUSE#ch 130 CLOSE#ch 140 : 150 DEFine PROCedure test(ch, a) 160 PRINT#ch; a 180 END DEFine test Result in

Re: [Ql-Users] SBASIC interpreter bug?

2022-11-23 Thread pjwitte via Ql-Users
Perhaps you didnt EX it? If you RUN it it may work, although a differently constructed (more complex) version would also fail. Anyway, its not about the platform, its about SMSQ/E. Ive tried it on SMSQ/E V3.25, 3.38 and 3b39 - all present with the same problem. Per On 22/11/2022 16:38,

Re: [Ql-Users] SBASIC interpreter bug?

2022-11-22 Thread pjwitte via Ql-Users
RUNing appears to work; its when EXing this program that the problem shows up. I believe its possible to get an error on RUNing too, I just havent been able to recreate the conditions. Typical errors are: At line nnn: At line : undefined loop control variable etc, all nonsense Clearly,

[Ql-Users] SBASIC interpreter bug?

2022-11-22 Thread Wolfgang Lenerz via Ql-Users
Hi, Does anyone know whats going on here? Nope... Even stranger : once you run this and it failed, change the variable name ("ch") to something else (like "cht") everywhere . Run it - and it works. Save the prog with that new variable name, start a new basic session, load the prog, run

[Ql-Users] SBASIC interpreter bug?

2022-11-22 Thread pjwitte via Ql-Users
Does anyone know whats going on here? SBASIC only: EXecute the following program: 100 ch = FOPEN("con"): CLS#ch 110 test ch, 1 120 PAUSE#ch 130 CLOSE#ch 140 : 150 DEFine PROCedure test(ch, a) 160 PRINT#ch; a 180 END DEFine test Result in this case: At line 150:4 DEFines may not be within

Re: [Ql-Users] SBASIC

2020-03-23 Thread Giorgio Garabello via Ql-Users
Yes, it works perfectly! Thanks for your advice which has become fundamental for me Do you think I wrote on the mailing list because I didn't want to disturb you. :-) Regards Gio P.Š. I looked at those things that you added on your fantastic site . WOW Il giorno dom 22 mar 2020

Re: [Ql-Users] SBASIC

2020-03-22 Thread pjwitte via Ql-Users
I was just pointing out, to anyone interested, that there is a lot more one can do with this ;o) Obviously a myprog_bas program has to exist and be valid, and the exclamation mark was informative and not meant to be part of the command. But EXEP 'SBASIC' should do what I presume you were

Re: [Ql-Users] SBASIC

2020-03-22 Thread Giorgio Garabello via Ql-Users
that's not true, it works Didn't I just understand the use of the exclamation mark? Il giorno dom 22 mar 2020 alle ore 21:35 Giorgio Garabello < g.garabe...@gmail.com> ha scritto: > > > Il giorno dom 22 mar 2020 alle ore 18:22 pjwitte via Ql-Users < > ql-users@lists.q-v-d.com> ha scritto: > >>

Re: [Ql-Users] SBASIC

2020-03-22 Thread Giorgio Garabello via Ql-Users
Il giorno dom 22 mar 2020 alle ore 18:22 pjwitte via Ql-Users < ql-users@lists.q-v-d.com> ha scritto: > Try EXEP 'SBASIC', this work well! > or even EXEP 'SBASIC'; 'lrun"myprog_bas"'! > this not Giorgio > > Per > On 22/03/2020 17:52, Giorgio Garabello via Ql-Users wrote: > > I'm trying to

Re: [Ql-Users] SBASIC

2020-03-22 Thread pjwitte via Ql-Users
Try EXEP 'SBASIC', or even EXEP 'SBASIC'; 'lrun"myprog_bas"'! Per On 22/03/2020 17:52, Giorgio Garabello via Ql-Users wrote: I'm trying to run the SBASIC command inside a compiled program (with Qliberator) but nothing happens . Ideas? 100 PRINT "STEP 1" 110 SBASIC 120 PRINT "STEP 2"

[Ql-Users] SBASIC

2020-03-22 Thread Giorgio Garabello via Ql-Users
I'm trying to run the SBASIC command inside a compiled program (with Qliberator) but nothing happens . Ideas? 100 PRINT "STEP 1" 110 SBASIC 120 PRINT "STEP 2" Regards Giorgio ___ QL-Users Mailing List

Re: [Ql-Users] sBASIC overloading...

2018-06-29 Thread pjwitte via Ql-Users
On 28/06/2018 09:03, Wolfgang Lenerz via Ql-Users wrote: Hi, I made a small Sbasic testcase (SMSQE, not QDOS). I made a program with procedures all called "abcdefghijklmnopqrt"+ a 5 digit number at the end. The program starts at line 100, is increased by one and very 12th line a new 10 line

Re: [Ql-Users] sBASIC overloading...

2018-06-28 Thread Dave Park via Ql-Users
I think it depends on which types of variables you're coercing... In this case, because integers are stored as floats and are a wicked lie, ints and floats are already the same thing logically speaking. So the only invalid coercion is string to float where the string contents are of the wrong

Re: [Ql-Users] sBASIC overloading...

2018-06-28 Thread Wolfgang Lenerz via Ql-Users
Hi, I made a small Sbasic testcase (SMSQE, not QDOS). I made a program with procedures all called "abcdefghijklmnopqrt"+ a 5 digit number at the end. The program starts at line 100, is increased by one and very 12th line a new 10 line procedure is created. The first statement therein is

Re: [Ql-Users] sBASIC overloading...

2018-06-28 Thread Wolfgang Lenerz via Ql-Users
Hi, I can't help but wonder whether the time taken to parse all your parameters to check whether they are the right type won't be longer than having several procedures. Wolfgang > I'll make sure to respond right away in future, before I've fully > understood the subtleties and implications of

Re: [Ql-Users] sBASIC overloading...

2018-06-21 Thread Per Witte via Ql-Users
Im not familiar with C++ overloading, but S*BASIC allows some "parametric polymorphism", viz: dim x%(2): for i% = 0 to 2: x%(i%) = 9 - i% Test 'abc', 2.99, x% : def proc Test(a, b%, c) print a\ b% \ c, \ enddef Test : Result: abc 2.99 9 8 7 The SBASIC compiler performs a number of additional

Re: [Ql-Users] sBASIC overloading...

2018-06-21 Thread Jan Bredenbeek via Ql-Users
On 21 June 2018 at 15:21, Dave Park via Ql-Users wrote: > > SuperBASIC is quite unique in that it stores the *difference* in length > of > > a line compared to the previous line, along with its line number. This > way, > > because the current line length is also stored in a system variable, it >

Re: [Ql-Users] sBASIC overloading...

2018-06-21 Thread Dave Park via Ql-Users
On Thu, Jun 21, 2018 at 3:13 AM, Jan Bredenbeek via Ql-Users < ql-users@lists.q-v-d.com> wrote: > SuperBASIC is quite unique in that it stores the *difference* in length of > a line compared to the previous line, along with its line number. This way, > because the current line length is also

Re: [Ql-Users] sBASIC overloading...

2018-06-21 Thread Jan Bredenbeek via Ql-Users
On 21 June 2018 at 00:43, Dave Park via Ql-Users wrote: > My reason for asking was, I was wondering if an analysis of how frequently > functions were called, and from where, could affect how quickly they would > be stepped to. I have seen this behavior in SuperBASIC on JM/JS and > achieved often

Re: [Ql-Users] sBASIC overloading...

2018-06-20 Thread Dave Park via Ql-Users
My reason for asking was, I was wondering if an analysis of how frequently functions were called, and from where, could affect how quickly they would be stepped to. I have seen this behavior in SuperBASIC on JM/JS and achieved often useful gains in improvements by placing the most frequently

Re: [Ql-Users] sBASIC overloading...

2018-06-20 Thread Jan Bredenbeek via Ql-Users
On 20 June 2018 at 22:35, Dave Park via Ql-Users wrote: > Hi all, > > Separately, does the sBASIC in SMSQ or Minerva still scan for > procedures/functions from the beginning of the program, so earlier FN/PROCs > have a speed advantage over later ones like in JM/JS? SuperBASIC (JM/JS/Minerva)

[Ql-Users] sBASIC overloading...

2018-06-20 Thread Dave Park via Ql-Users
Hi all, How hard would it be to extend sBASIC functions to support C++ style overloading? Separately, does the sBASIC in SMSQ or Minerva still scan for procedures/functions from the beginning of the program, so earlier FN/PROCs have a speed advantage over later ones like in JM/JS? -- Dave

Re: [Ql-Users] SBASIC 'ls' procedure

2017-02-12 Thread Jan Bredenbeek
>> To save you reinventing the wheel Jan, Norman Dunbar's DJToolkit has an > extension called LEVEL2 which tests for a Level 2 filing system. The > assembler source djtoolkit_asm is included with the toolkit - just search > for 'level2' in that source. > > http://www.dilwyn.me.uk/tk/djtk.zip >

Re: [Ql-Users] SBASIC 'ls' procedure

2017-02-12 Thread Dilwyn Jones
- NOTE: On non-V2 drivers which don't support subdirectories, ls will fail because the FNAME$ function stops with 'bad parameter' on directory channels. This can be avoided by adjusting line 1710 in the code (as indicated in the REMarks). I'll probably have to design another machine code call to

Re: [Ql-Users] SBASIC 'ls' procedure

2017-02-12 Thread RWAP Software
On 2017-02-12 16:43, Jan Bredenbeek wrote: On 12 February 2017 at 15:29, RWAP Software wrote: Hi Jan, That is great - it is a nice function which can be useful. Could I ask you to consider moving (or Forking?) the repository to the new SInclair QL Github, as this

Re: [Ql-Users] SBASIC 'ls' procedure

2017-02-12 Thread Jan Bredenbeek
On 12 February 2017 at 15:29, RWAP Software wrote: > Hi Jan, > > That is great - it is a nice function which can be useful. > > Could I ask you to consider moving (or Forking?) the repository to the new > SInclair QL Github, as this is intended to keep all of the QL

Re: [Ql-Users] SBASIC 'ls' procedure

2017-02-12 Thread RWAP Software
Hi Jan, That is great - it is a nice function which can be useful. Could I ask you to consider moving (or Forking?) the repository to the new SInclair QL Github, as this is intended to keep all of the QL stuff together - https://github.com/SinclairQL Rich On 2017-02-12 14:24, Jan

Re: [Ql-Users] SBASIC 'ls' procedure

2017-02-12 Thread Jan Bredenbeek
I've updated the code with various improvements and fixes: - Listing now adjusts to window size and can be aborted by pressing 'Q' or ESC, even when recursing directories; - Redirection by DEV device is now handled correctly (so long as you don't rename the DEV device itself ;)) - SMSQ is no

[Ql-Users] SBASIC 'ls' procedure

2017-01-29 Thread Jan Bredenbeek
Okay, here it is. Merge this into your BOOT file and you'll have a Unix-like 'ls' command, and even a 'lsr' command to list directories recursively. It lists one file per line, with type, size and date info, and without the subdirectory names in front of each filename (unlike DIR and WSTAT). The

[Ql-Users] SBASIC / SuperBASIC Reference Manual - Online (HTML)

2014-08-10 Thread Rich Mellor (RWAP)
Thanks to some sterling work by tcat to further develop the automatic conversion tool, the first version of the SBASIC/SuperBASIC Reference Manual is now online at: http://www.rwapsoftware.co.uk/SBASIC_reference_manual_online/Foreword.html JOBS to do - volunteers are required, as I will not

[Ql-Users] SBasic Thing documentation

2009-04-02 Thread Christopher Cave
Thank you George for your response. I have now discovered the relevant bit in the QPC/SMSQ manual and will try to decipher it. The Q40/SMSQ manual doesn't appear to have this bit. From your message, I conclude that it really isn't that easy but I'll persevere for a little while longer!

Re: [Ql-Users] SBasic Thing documentation

2009-03-28 Thread gdgqler
On 26 Mar 2009, at 08:59, Christopher Cave wrote: Does anyone know what the SBasic thing expects on the stack when it is used? Or can anyone please tell me where the appropriate documentation can be found (I have the SMSQ source but no idea where in it to look)? Looking at Jonathan Hudson's

[Ql-Users] SBasic Thing documentation

2009-03-26 Thread Christopher Cave
Does anyone know what the SBasic thing expects on the stack when it is used? Or can anyone please tell me where the appropriate documentation can be found (I have the SMSQ source but no idea where in it to look)? Looking at Jonathan Hudson's code, I can see that it can be passed a command string

Re: [Ql-Users] SBASIC extras

2007-08-14 Thread George Gwilt
On 11 Aug 2007, at 13:57, Dilwyn Jones wrote: PAR_WAIT (presumably something to do with parallel port) This is part of SMSQ/E but its definition is not in my QPC2 manual. The code seems to set a pause for a period of time. Perhaps the author knows what for? George

Re: [Ql-Users] SBASIC extras

2007-08-14 Thread Marcel Kilgus
George Gwilt wrote: PAR_WAIT (presumably something to do with parallel port) This is part of SMSQ/E but its definition is not in my QPC2 manual. The code seems to set a pause for a period of time. Perhaps the author knows what for? That would be Tony. According to the QDOS Classic

Re: [Ql-Users] SBASIC extras

2007-08-13 Thread Dilwyn Jones
Looking at a list of SBASIC extensions created with an EXTRAS command, there are 3 extensions I noticed that I don't know what they do. Not in my (admittedly old) manual. Anyone know? CHK_HEAP (Some form of heap check suggested by the name) HOME_CSET (presumably

[Ql-Users] SBASIC extras

2007-08-11 Thread Dilwyn Jones
Looking at a list of SBASIC extensions created with an EXTRAS command, there are 3 extensions I noticed that I don't know what they do. Not in my (admittedly old) manual. Anyone know? CHK_HEAP (Some form of heap check suggested by the name) HOME_CSET (presumably something to do with

Re: [Ql-Users] SBASIC extras

2007-08-11 Thread P Witte
Dilwyn Jones writes: Looking at a list of SBASIC extensions created with an EXTRAS command, there are 3 extensions I noticed that I don't know what they do. Not in my (admittedly old) manual. Anyone know? CHK_HEAP (Some form of heap check suggested by the name) HOME_CSET