[front] [back] 


 
Pse, don't expect much, by now.
I'll continue as time permits, and probably some request might suggest...
 



 
Keywords:

BLIST, BLIST_S

BLIST will list the SBasic PROC/FU's and their definition lines, as present in the current SBasic job.
BLIST_S can be used to find an SBasic token (re. PiQ) and list the respective lines.
If called without a parameter it will list any occurrences of the MISTake statement.
 


Keywords:

CH_KEYQ, DROP, JB_TNUM, PICK%, SYSV_W, JB_SUS

Assigning a Commandline History (of 100 lines) to some other Job.

Depending on the particular QDOS(ish) system it might be required to inserting a PAUSE command, or JB_SUS, to allow for setting up the newly started job.
PAUSE and JB_SUS (job suspension) behave differently in the QL/QDOS and with SMSQ/E - one system works with JB_SUS, the other with PAUSE. I don´t remember which, but the "autoquil" demo program does...

 


Keywords:

USE, CH_HI, and W_OUTL, W_BREIT, W_HOCH, etc, of the WD1 group; ARRAY parameter passing.

Any of the IO2 keywords using a group of parameters of the same type numbers accept arrays instead of single parameters, as MAX, MIN, etc, which then executes much faster (up to 90%, and even more!). The following two procedures are an example which can be used to storing and re-storing the sizes of as many windows as are opened in the current *Basic-job, the actual number of which being determined by CH_HI:

Any number of windows data storage variables can be defined/used:

1000 :
1010 DIM wdata%(CH_HI+1,8)
1020 WDAT wdata%
1020 :
1030 : REMark program, using some other window sizes
1040 :
1050 WDEF wdata%
1060:

Collecting the windows sizes and "outlines" data into the DIM'ed number parameter:

30000 :
30004 DEFine PROCedure WDAT(wd)
30008 LOCal f,b%,u%
30012 b%=DIMN(wd):u%=USE_IS(#1)
30016 wd(b%,0)=W_XLIM(#2) : wd(b%,1)=W_YLIM(#2)
30024 wd(b%,2)=W_XTOP(#2) : wd(b%,3)=W_YTOP(#2)
30032 FOR f=0TO b%-1
30036 IF IS_CON(#f)
30040 USE#f:b%=W_RAND
30044 wd(f,0)=W_BREIT+4*b% : wd(f,1)=W_HOCH+b%+b%
30052 wd(f,2)=W_LINKS-b%-b% : wd(f,3)=W_OBEN-b%
30060 wd(f,7)=b% : wd(f,6)=1
30064 wd(f,8)=W_BCOLR : REMark :old IO2 versions: wd(f,8)=CHV_B(#1,,71)
30072 USE
30076 END IF
30072 END FOR f:USE#u%
30080 END DEFine

The window sizes and "outlines" can now be restored from a suitably DIMensioned variable.
Any excess parameters will be silently discarded, thus there are no silly "bad parameter" errors returned by W_WDEF, etc, just because too many parameters were given, or an array being bigger than actually required:

30082 :
30084 DEFine PROCedure WDEF(wd)
30088 LOCal f,b
30092 b=DIMN(wd)-1 : f=W_OUTL(#0,wd(b+1))
30096 FOR f=1 TO b
30100  IF wd(f,0)AND IS_CON(#f) : DROP W_OUTL(#f,wd(f))
30108 END FOR f
30112 CLS#0 : f=W_WDEF(#0,wd(0))
30116 FOR f=0 TO b
30120  IF wd(f,0): IF IS_CON(#f) : BORDER#f,wd(f,7),wd(f,8)
30128 END FOR f
30132 END DEFine
30136 :

 



 

Keywords:

DEVUSE$, NFSUSE$
The re-namable and network device usage:

PRINT DEVUSE$
PRINT DEVUSE$("RAM")
PRINT DEVUSE$("FLP")
PRINT DEVUSE$("WIN")
PRINT\NFSUSE$\\
FOR r = 0 TO 7 : PRINT NFSUSE$(8);r+1,NFSUSE$(r)

 



 

Keywords:

PICK% (PEX), CH_QKEYQ, JB_ID, JB_SUS, LINUM, TO_QUEUE, VGET

Debugging SBasic-jobs (MINERVA & QL, only) and - if compiled with the LINES option - any QDOS/SBasic systems QLIBerator compiled programs:

This is a short sequence which helps to check a certain area of a BASIC program. It will be tracing a QLIB-compiled/SBasic job until a certain lines interval ("first" to "last" in the example) was reached, to then push the 'trace' command to the keyboard input queue of the C1MON. The monitor, after being set to monitoring the job concerned will then temporary halt that job until tracing is continued by manual input.

100 first=4000 : last=4200
110 job=JB_ID('job_to_test`)
120 r=PICK%(JB_ID('c1m'))
130 JB_SUS 10 : q=CH_QKEYQ
140 r=PICK%
150 REMark : string def'n, SELect and single line statement for fast(est) action
160 e$='j 0'&HEX$(job,32)&':t'&CHR$(10)
170 REPeat r:n=LINUM(#job):SELect n=first TO last:JB_SUS#job,100:n=TO_QUEUE(q!0,e$):EXIT r

The above procedure cannot be used with SMSQ-systems because of it's incompatible SBasic structures. Another trigger which would be functional even in those SMSQs, could be the value of some variable in the program, which can be read by VGET and then be evaluated similarly as in the above example:
n=VGET(#job,'vari_name')

 


[front] [back](count)


.hpr'98