QD SBASIC Parser Thing
Re: QD SBASIC Parser Thing
The SBAS/QD Thing doesnt open any windows, nor is there a need to open any windows unless your program needs them. The most likely reason you get the miniature SBASIC window is that something in your program implicitly addresses channel #0 or #1. It may not be obvious, but things like SCR_XLIM and PAUSE, among many others, all use a default channel and will therefore cause a window to be opened if no channel has been specified.
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
-
- Font of All Knowledge
- Posts: 4691
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: QD SBASIC Parser Thing
Hi Per,
Thank you for the extras vital information, it now makes sense.
If the default channel is not supplied, then a SBAS/QD thing opens a channel to accommodate this.
In my case the missing channel statement was on an INKEY$ definition scanning for a key to be pressed:
SBAS/QD thing would open a default channel for the missing channel in the INKEY$. Adding the defined console channel solved this, for example:
Bad programming on my part.
Is there any documentation on the SBAS/QD thing?
Thank you for the extras vital information, it now makes sense.
If the default channel is not supplied, then a SBAS/QD thing opens a channel to accommodate this.
In my case the missing channel statement was on an INKEY$ definition scanning for a key to be pressed:
Code: Select all
REPeat loop
IF INKEY$(-1)<>"": EXIT loop
END REPeat Loop
Code: Select all
REMark #chan is a console channel
REPeat loop
IF INKEY$(#chan,-1)<>"": EXIT loop
END REPeat Loop
Is there any documentation on the SBAS/QD thing?
Regards,
Derek
Derek
Re: QD SBASIC Parser Thing
Hi Derek,
I often write short, line number-less, windowless utilities to be run entirely under SBAS/QD:
Execute the source file into a QD via Qpac2 Files, adjust a parameter or two, press F10. A
satisfying beep or nasty burp signals success or failure - an' Bob's yer mum's live-in lover!
Window-less or not, the SBASIC miniature window feature can be useful for debugging:
Provided your designated output channels are opened with FOPXXX (which returns consecutive
channel numbers starting with #3), you can put a line anywhere in your code to print out
debugging information. When satified, just delete it again. Eg:
The debug line is unlikely to mess with the rest of your program
If there was any documentation, I no longer remember. Its too long ago. All my physical stuff
is elsewhere so I cant check. Someone else please pipe up!
I often write short, line number-less, windowless utilities to be run entirely under SBAS/QD:
Execute the source file into a QD via Qpac2 Files, adjust a parameter or two, press F10. A
satisfying beep or nasty burp signals success or failure - an' Bob's yer mum's live-in lover!
Window-less or not, the SBASIC miniature window feature can be useful for debugging:
Provided your designated output channels are opened with FOPXXX (which returns consecutive
channel numbers starting with #3), you can put a line anywhere in your code to print out
debugging information. When satified, just delete it again. Eg:
Code: Select all
..
..
rem Check out PIC
ch = fop_in(ifn$): if ch < 0: ret ch
fl = flen(#ch)
wget#ch; f%, x%, y%, l%, m%
close#ch
print fl! ifn$\ f%, x%, y%, l%, m% div 256: pause: rem Debug
..
..
If there was any documentation, I no longer remember. Its too long ago. All my physical stuff
is elsewhere so I cant check. Someone else please pipe up!
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Re: QD SBASIC Parser Thing
There's something messed up in your family relations...pjw wrote: - an' Bob's yer mum's live-in lover!
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: QD SBASIC Parser Thing
The QD manual does not explain anything but there is a small chapter in the SMSQ/E manual: "The SBASIC Interface Thing" (page 33).pjw wrote:If there was any documentation, I no longer remember. Its too long ago. All my physical stuff
is elsewhere so I cant check. Someone else please pipe up!
A word of warning when using this with DATA lines. A "RESTORE linenumber" does not work and will restore to the beginning.
Bob
PS: I deny ever having met "yer mum".
-
- Font of All Knowledge
- Posts: 4691
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: QD SBASIC Parser Thing
Hi,
I did remember Jochen saying something about the RESTORE line, it seemed to a difficult statement to renumber.
But if numberless lines are used, the RESTORE statement will only restore to start of the programme.
Pity there was not Labels in SBASIC, so that the DATA lines could be referenced by Label rather than number.
The more I think about the way SBAS/QD handles channel numbers, the more I like it. As I always try write programmes with their own channels and not use Channels #0,1,2
With regards to your mother's brother called Robert, I doubt he is a live in lover outside Scandinavia, as they different customs than in the UK and Europe.
I did remember Jochen saying something about the RESTORE line, it seemed to a difficult statement to renumber.
But if numberless lines are used, the RESTORE statement will only restore to start of the programme.
Pity there was not Labels in SBASIC, so that the DATA lines could be referenced by Label rather than number.
The more I think about the way SBAS/QD handles channel numbers, the more I like it. As I always try write programmes with their own channels and not use Channels #0,1,2
With regards to your mother's brother called Robert, I doubt he is a live in lover outside Scandinavia, as they different customs than in the UK and Europe.
Regards,
Derek
Derek
Re: QD SBASIC Parser Thing
Aha, so much for a full working program.....BSJR wrote:A word of warning when using this with DATA lines. A "RESTORE linenumber" does not work and will restore to the beginning.
7000 4E75
Re: QD SBASIC Parser Thing
Then this shouldnt work in SBAS/QD:BSJR wrote:<>
The QD manual does not explain anything but there is a small chapter in the SMSQ/E manual: "The SBASIC Interface Thing" (page 33).
A word of warning when using this with DATA lines. A "RESTORE linenumber" does not work and will restore to the beginning.
Code: Select all
10 ch = FOPEN("con")
20 CLS#ch
25 :
30 RESTORE 100
40 READ item
50 PRINT#ch; item! '= 100?'
60 PAUSE#ch: QUIT
70 :
80 DATA 80
90 DATA 90
100 DATA 100
110 :
Code: Select all
ch = FOPEN("con")
CLS#ch
:
RESTORE 11
READ item
PRINT#ch; item! '= 11?'
PAUSE#ch: QUIT
:
DATA 80
DATA 90
DATA 11
:
with line numberless programs.
I never said anything, RobertBSJR wrote: PS: I deny ever having met "yer mum".

Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Re: QD SBASIC Parser Thing
Who has written the SBAS/QD? Was it JMS or TT? Would be better, to get the source to correct a few things! And there is also QBASIC. What do we use?
7000 4E75
Re: QD SBASIC Parser Thing
Well, theres always this:Derek_Stewart wrote:<>
Pity there was not Labels in SBASIC, so that the DATA lines could be referenced by Label rather than number.
Code: Select all
RANDOMISE DATE
RESTORE
READ dummy
READ LABel1
READ LABel2
READ LABel3
:
DATA 0: REMark Dummy
PRINT 'LABel1 is at line no.'! LABel1
PRINT 'LABel2 is at line no.'! LABel2
PRINT 'LABel3 is at line no.'! LABel3
:
FOR i = 0 TO 2
choose = RND(1 TO 3)
PRINT 'Choice'! choose,
ON choose GO SUB LABel1, LABel2, LABel3
END FOR i
BGET k%
IF JOBID: QUIT: ELSE : STOP
:
REMark Lable 1
DATA PEEK_W(\\ $94)
PRINT 1: RETurn
:
REMark Lable 2
DATA PEEK_W(\\ $94)
PRINT 2: RETurn
:
REMark Lable 3
DATA PEEK_W(\\ $94)
PRINT 3: RETurn
:

Strictly SBASIC only! (Ie not even a Qlibbed program running on SMSQ/E)
Actually, I think it is a feature of SBASIC more than SBAS/QD. You may loose a little space on the "gap" in the S*BASIC channel table if channel numbers only start at #3 but, of course you can override it.The more I think about the way SBAS/QD handles channel numbers, the more I like it. As I always try write programmes with their own channels and not use Channels #0,1,2
Without wishing to impugn my family: Yes, we Scandinavians sure do have more relaxed mores and customes! And Im glad of it! However, that doesnt necessarily stretch as far as the misunderstanding seems to be here. It is not uncommon, even in English-speaking countries, for kids to call their divorced mother's subsequent boyfriend(s) for 'uncle'. After all the 'Dad' label is already taken.With regards to your mother's brother called Robert, I doubt he is a live in lover outside Scandinavia, as they different customs than in the UK and Europe.
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen