Too many nested GOSUBS error

Tyler tyler.style at gmail.com
Tue Sep 19 10:16:34 PDT 2006


Why not pop in some debug code that counts your gosubs and your
returns, and logs it somewhere if the difference is about to exceed
the limit?   Other programming tools you usually get this built in,
it's called a stack tracer.  It's what I used when debugging a similar
problem when I tried using recursion in a filePro driver program some
while ago.

(rant:  when I asked about why the limit at all, much less so low, I
was told that recursion wasn't a real programmer's technique; it's
only useful for irrelevant things like calculating fibonacci
sequences.  filePro doesn't need to support anything so useless -  16
nested gosubs should be enough for anybody!  Me, I use recursion often
in other programming languages, as it is very handy and often makes
for clean and elegant solutions.  Particularly when you need to
navigate parent-child relationships between data that don't have a
fixed number of descendants)

Tyler

> Message: 8
> Date: Tue, 19 Sep 2006 11:43:23 -0400
> From: "Don Coleman" <dcoleman at dgcreact.com>
> Subject: Too many nested GOSUBS error
> To: "'filePro'" <filepro-list at lists.celestial.com>
> Message-ID: <002401c6dc02$5712e820$fd6e10ac at SagerDGC>
> Content-Type: text/plain;       charset="us-ascii"
>
> Win2000 clients; Win2000 Advanced Server;fP v5.0.13
>
> I have a *clerk posting routine which occasionally errors with a
> "Too many nested GOSUB's message.  The client may see this error on 1-2
> transactions/week out of 10,000+ transactions/week.  Below is the beginning
> of the routine which errors on line #22.  There are only 5 GOSUB routines
> and I cannot imagine a transaction which would test TRUE to nearly all 5
> GOSUB condition statements.
>
> I guess my question is, since this is a looping process based on a index
> flag (YESNO) where the application checks the file for any transactions
> which have not yet been posted and if it finds any it posts them and marks
> the flag as posted.  Since this app. only ends/exits at either the end of
> the day or if it errors does the limit of 16 nested GOSUBS apply to each
> transaction being posted or until the application has processed sufficient
> transactions to exceed the limit of 16?
>
> The GOSUB routine is noted after the beginning of the table.  I apologize
> for the length of the GOSUB routine but I posted it in case my question is
> ambigious.
>


More information about the Filepro-list mailing list