Hi,
> INSTR_CASE
> SMSQE works as expected
> but not as Qlib Job
Without checking by actually tracing a call to INSTR from within a Qlib
job, I believe that this probably is one incompatibility between SMSQE
and QDOS/Qlib.
To honour the INSTR_CASE, SMSQE checks a flag, namely the SBasic
variable sb_cinst (=$b0) (see smsq_sbas_iexpr_asm, label b_instr) which
is set by INSTR_CASE.
However, in QDOS, the SuperBasic variable at $b0 is "bv_tkpos", which
contains something else entirely, namely "Position of A4 in tklist on
entry to PROC". If Qlib correctly mimicks SuperBasic, it probably
overwrites the flag at $b0 with the correct value for Superbasic between
the INSTR_CASE keyword and the INSTR.
This difference (and others) between QDOS and SMSQ/E Basic variables is
not documented (yet) in the SMSQ/E reference guide, but can be seen
form the keys_sbasic file in the SMSQ/E sources. I will include
something in the next version of the reference guide.
Season's greetings to everyone!
Wolfgang
Probably because Qlib doesnt know that there are two different instr
routines in SMSQ/E. The INSTR keyword is part of the S*BASIC language;
it isnt like a toolkit function, so Qlib probably calls this routine
directly which, unlike SBASIC's keyword, doesnt check the sb_cinst flag
before execution.
It could probably easily be fixed, but it still wouldnt work on a Qdos
machine as the underlying code isnt there.
Per
_______________________________________________
QL-Users Mailing List
_______________________________________________
QL-Users Mailing List