Re: [Ql-Users] Question regarding the expected behaviour of the SBASIC cmd MRUN in a program...

2009-10-16 Thread GO BOY GO-LT

Martyn wrote -

.. It's more than open to interpretation, but if you're
still interested, let me explain (it's a bit long winded, but then I
test software as part of my real job and get a bit fastidious about 
it).


Write on Martyn, please..

And thanks.

John in Wales 
___

QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Question regarding the expected behaviour of the SBASIC cmd MRUN in a program...

2009-10-15 Thread gdgqler


On 15 Oct 2009, at 00:13, Martyn Hill wrote:



Take the following simple example (no MRUN involved here):

Scenario A: LRESPR in the main program - OK.

  10 LRESPR some_extn_file : REMark ** LRESPR some useful SB  
extentions
  20 dummy_proc   : REM ** Call a PROC that  
doesn't exist in this program


Because the PROC dummy_proc doesn't exist, the following (expected)  
error is returned:


  At line 20:1 unknown procedure

OK, so far.

Scenario B: LRESPR from within an invoked PROC - Unusual.

  10 init_extns: REMark ** Call a PROC that LRESPRs some  
useful SB extentions
  20 dummy_proc  : REM ** Call a PROC that doesn't exist in this  
proram

  ...
  100 DEF PROC init_extns
  110   LRESPR some_extn_file
  120 END DEF

Now, the invocation of PROC dummy_proc still causes an error, but  
this time is thus:


  At line 120:1 unknown procedure



I have tried this with tptr_ext being LRESPRd but the error is  
correctly signalled after the call to the non-existent proc.


I wonder if your program would also allow tptr_ext to be LRESPRd. If  
if so then there must be something special about what you are  
LRESPRing. If not then???



George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Question regarding the expected behaviour of the SBASIC cmd MRUN in a program...

2009-10-15 Thread Marcel Kilgus
gdgqler wrote:
 I wonder if your program would also allow tptr_ext to be LRESPRd. If
 if so then there must be something special about what you are  
 LRESPRing. If not then???

I did a quick test (using MENU_REXT) and actually even managed to
crash SMSQ/E completely once. So there may be some dogs buried, but
usually the graves are so hard to find that in these fringe cases I
try to avoid them at all... ;-)

Marcel

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Question regarding the expected behaviour of the SBASIC cmd MRUN in a program...

2009-10-14 Thread Martyn Hill

Hi

Thanks to everyone who answered my initial post on this peculiar issue 
of MRUN not continuing to run the remaining program after merging some 
definitions.


Firstly, I tried the simple cases suggested and yes, MRUN works just as 
expected.


Secondly, line numbers of the merged definitions were not at fault (no 
overlap with existing lines).


Then I started to carry out (what turned out to be) an exhaustive bit of 
testing with my own boot program and have now been able to replicate 
this curious behaviour.


This testing appears to have isolated a _possible_ problem with SBASIC 
when LRESPRing a significant number of SB resident extentions from 
within a PROC. It's more than open to interpretation, but if you're 
still interested, let me explain (it's a bit long winded, but then I 
test software as part of my real job and get a bit fastidious about it).


Take the following simple example (no MRUN involved here):

Scenario A: LRESPR in the main program - OK.

   10 LRESPR some_extn_file : REMark ** LRESPR some useful SB extentions
   20 dummy_proc   : REM ** Call a PROC that 
doesn't exist in this program


Because the PROC dummy_proc doesn't exist, the following (expected) 
error is returned:


   At line 20:1 unknown procedure

OK, so far.

Scenario B: LRESPR from within an invoked PROC - Unusual.

   10 init_extns: REMark ** Call a PROC that LRESPRs some 
useful SB extentions

   20 dummy_proc  : REM ** Call a PROC that doesn't exist in this proram
   ...
   100 DEF PROC init_extns
   110   LRESPR some_extn_file
   120 END DEF

Now, the invocation of PROC dummy_proc still causes an error, but this 
time is thus:


   At line 120:1 unknown procedure

Curious - the SB program pointer appears to have gotten screwed. No 
biggie in this simplistic case.


However, coming back to the MRUN issue (finally), let's assume that 
dummy_proc is contained in another file dummy_proc_def, like this:


   200 DEF PROC dummy_proc
   210   PRINT 'Running dummy_proc...'
   220 END DEF

Now let's see what happens...

Scenario C: LRESPR in the main program, with MRUN - OK.

   10 LRESPR some_extn_file : REMark ** LRESPR some useful SB extentions
   15 MRUN dummy_proc_def
   20 dummy_proc   : REM ** Call a PROC that has 
just been MERGEd


Because the PROC dummy_proc now exists, it runs without error as 
expected, printing the debug message 'Running dummy_proc...'


Scenario D: LRESPR from within an invoked PROC, then MRUN - Unhelpful.

   10 init_extns: REMark ** Call a PROC that LRESPRs some 
useful SB extentions

   15 MRUN dummy_proc_def
   20 dummy_proc  : REM ** Call a PROC that has just been MERGEd
   ...
   100 DEF PROC init_extns
   110   LRESPR some_extn_file
   120 END DEF

In this case, the invocation of dummy_proc just never happens, no debug 
message is printed and the program simply halts withour error. An 
inquisitive LISTing shows dummy_proc is safely merged.


This is the behaviour that lead to my initial posting.

I've tested with various SB resident extention files - DIY Toolkits, 
Turbo (full) TK, the QLib1.6 TK, as well as FileInfo and Menu_rext.


All result in the same obserevd behaviour, _except_ when LRESPRing the 
simple ENV extentions.


My _guess_ for the difference in behaviour between TKs is that ENV 
doesn't add as many extra SB resident procs/fns as the others and the 
growth in the name table while running inside the init_extns proc is 
clobering some return stack or SB variable. Now I'm talking well out of 
my league, so will stop here.


It's hardly a show-stopper - I can simply move my LRESPRs outside a 
defined proc, but thought that there might be at least one of you who'd 
be marginally interested (Marcel?)


Oh, I'm running QPC 3.34, SMSQ/E 3.13 HBA with 16MB RAM.

Regards,
Martyn Hill
London.

Martyn Hill wrote:

Hi again

Could anyone say whether the behaviour that I'm seeing when using MRUN 
in a running SBASIC prog is expected?


As part of my initial SB boot prog, I include an MRUN statement that 
successfully merges some useful SB definitions (only).


I expect the boot prog to continue to execute the next statement, but 
it simply stops after merging the DEFs.


I'm running this in QPC. Is this expected behaviour? I read in the 
manual that MRUN in a program _should_ continue with the next runnable 
statement in the program.


Regards,
Martyn Hill
London.


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Question regarding the expected behaviour of the SBASIC cmd MRUN in a program...

2009-10-12 Thread gdgqler


On 11 Oct 2009, at 22:17, Martyn Hill wrote:

Could anyone say whether the behaviour that I'm seeing when using  
MRUN in a running SBASIC prog is expected?


As part of my initial SB boot prog, I include an MRUN statement that  
successfully merges some useful SB definitions (only).


I expect the boot prog to continue to execute the next statement,  
but it simply stops after merging the DEFs.


I'm running this in QPC. Is this expected behaviour? I read in the  
manual that MRUN in a program _should_ continue with the next  
runnable statement in the program.



I have just written a program which uses MRUN in a BASIC program (P) .  
MRUN loads a procedure which is called by the line following MRUN.  
This works in QPC2 both by RUN having loaded P and also by LRUNning P.


I guess there must be something else in your  BOOT which causes the  
trouble.


George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Question regarding the expected behaviour of the SBASIC cmd MRUN in a program...

2009-10-12 Thread P Witte
Hi Martyn,

Could your problem have to do with line numbers?

Per



 Message Received: Oct 11 2009, 10:17 PM
 From: Martyn Hill martyn.joseph.h...@googlemail.com
 To: ql-users@lists.q-v-d.com
 Cc: 
 Subject: [Ql-Users] Question regarding the expected behaviour of the SBASIC 
cmd MRUN in a program...
 
 
 Hi again
 
 Could anyone say whether the behaviour that I'm seeing when using MRUN 
 in a running SBASIC prog is expected?
 
 As part of my initial SB boot prog, I include an MRUN statement that 
 successfully merges some useful SB definitions (only).
 
 I expect the boot prog to continue to execute the next statement, but it 
 simply stops after merging the DEFs.
 
 I'm running this in QPC. Is this expected behaviour? I read in the 
 manual that MRUN in a program _should_ continue with the next runnable 
 statement in the program.
 
 Regards,
 Martyn Hill
 London.
 ___
 QL-Users Mailing List
 http://www.q-v-d.demon.co.uk/smsqe.htm
 
 



___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Question regarding the expected behaviour of the SBASIC cmd MRUN in a program...

2009-10-12 Thread Malcolm Cadman
In message 4ad24b63.5030...@googlemail.com, Martyn Hill 
martyn.joseph.h...@googlemail.com writes


Hi Martyn.

I know that LRUN works fine, in Boot links, as I use it successfully to 
chain a number of smaller Boot files; rather than one long one.  As well 
as making choices to go to differing options.


Maybe MRUN runs out direction after a merge somewhere in your Boot ?

Or maybe it is just a line number problem ?



Hi again

Could anyone say whether the behaviour that I'm seeing when using MRUN 
in a running SBASIC prog is expected?


As part of my initial SB boot prog, I include an MRUN statement that 
successfully merges some useful SB definitions (only).


I expect the boot prog to continue to execute the next statement, but 
it simply stops after merging the DEFs.


I'm running this in QPC. Is this expected behaviour? I read in the 
manual that MRUN in a program _should_ continue with the next runnable 
statement in the program.


Regards,
Martyn Hill
London.


--
Malcolm Cadman
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


[Ql-Users] Question regarding the expected behaviour of the SBASIC cmd MRUN in a program...

2009-10-11 Thread Martyn Hill

Hi again

Could anyone say whether the behaviour that I'm seeing when using MRUN 
in a running SBASIC prog is expected?


As part of my initial SB boot prog, I include an MRUN statement that 
successfully merges some useful SB definitions (only).


I expect the boot prog to continue to execute the next statement, but it 
simply stops after merging the DEFs.


I'm running this in QPC. Is this expected behaviour? I read in the 
manual that MRUN in a program _should_ continue with the next runnable 
statement in the program.


Regards,
Martyn Hill
London.
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm