dbTalk Databases Forums  

QM Objects/Recursion (how): attn. Martin Philips

comp.databases.pick comp.databases.pick


Discuss QM Objects/Recursion (how): attn. Martin Philips in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
poundsailor
 
Posts: n/a

Default QM Objects/Recursion (how): attn. Martin Philips - 12-13-2011 , 04:41 AM






Help please I get:

9994
9995
9996
9997
9998
9999
000000B4: CALLs nested too deeply at line 6 of CTEST

Tried posting to OpenQM group - doesn't appear

How to get recursion in QM (losing the call stack) Thought objects
would do it.

How I judged would get recursive routines on QM. The object I put
into a common block so the object can call itself. Slight disadvantage
with that - having to name the object instance within the class.

class

0001: CLASS CTEST
0002: PUBLIC FUNCTION ST(A)
0003: $INSERT BP INCLUDE
0004: A += 1
0005: PRINT A
0006: PRINT TEST->ST(A) ;* <- named here
0007: RETURN A
0008: END
0009: END

calling testprog

0001: $INSERT BP INCLUDE
0002: TEST = OBJECT('CTEST')
0003: A = 1
0004: PRINT TEST->ST(A)
0005: END

common

0001: COMMON TEST

setup is scarlet DME 2.6-6

Reply With Quote
  #2  
Old   
poundsailor
 
Posts: n/a

Default Re: QM Objects/Recursion (how): attn. Martin Philips - 12-13-2011 , 04:46 AM






$BP INCLUDE
= the common block

Reply With Quote
  #3  
Old   
crud
 
Posts: n/a

Default Re: QM Objects/Recursion (how): attn. Martin Philips - 12-13-2011 , 08:03 AM



ok - will be possible just in a loop
of course a call will be stacked

absolutely no problem

what a fantastic product QM/scarlet DME is
the corporate equivalent MVDBMS

(but open source)

Reply With Quote
  #4  
Old   
crud
 
Posts: n/a

Default Re: QM Objects/Recursion (how): attn. Martin Philips - 12-13-2011 , 08:40 AM



better -

put everything in a common all vars needed by recurring routine
then just iteratively call it with CHAIN (no return)

some sort of signal when it's finished
will do that

reason for recursion - modular code
less code

bye

Reply With Quote
  #5  
Old   
crud
 
Posts: n/a

Default Re: QM Objects/Recursion (how): attn. Martin Philips - 12-13-2011 , 08:46 AM



& named (labelled) commons - less code again
stop using subroutine parameters
all just in separate named commons (for routines)

excellent - what a fantastic product openqm/scarlet DME is
with pedigree

the corporate equivalent MVDBMS

Reply With Quote
  #6  
Old   
Martin Phillips
 
Posts: n/a

Default Re: QM Objects/Recursion (how): attn. Martin Philips - 12-14-2011 , 02:57 AM



On Dec 13, 10:41*am, poundsailor <poundsai... (AT) devnull (DOT) com> wrote:
Quote:
Help please I get:

9994
9995
9996
9997
9998
9999
000000B4: CALLs nested too deeply at line 6 of CTEST

Tried posting to OpenQM group - doesn't appear
Firstly, unless you are using a different name here, you are not
registered for the OpenQM group and hence cannot post there.

The error message you are seeing is correct. QM imposes a configurable
limit on the depth of internal subroutine calls. Your class module
calls itself recursively without any end condition and hence will
eventually hit this limit. It's there to trap errors neatly rather
than going on until you run out of memory (a long time on a 64 bit
system).

You start your posting by citing this as a QM issue and put "Attn
Martin Phillips" in the subject line but you then mention that you are
running Scarlet. This is a private fork of a very old version of QM
and has no connection with the current commercial QM product.


Martin Phillips, Ladybridge Systems

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.