nested gosubs

Nancy Palmquist nlp at vss3.com
Fri May 31 14:19:28 PDT 2013


James,

This is usually not the real issues.

gosub one
     gosub two
         gosub three
         ...
return
return
return
that would be real nesting.

What is more likely is a bad use of gosub from @WHEN processing.   I see 
this much more often.

What happens is that the GOSUB routine, contains a command that stops 
the routine before it gets to the RETURN.  Leaving the gosub hanging but 
not executing.

@wlfxx:  gosub one
one  - has a SCREEN command ( most likely)   - this would stop execution 
of the @wHEN so it would never close the routine.  You do this a few 
times and you get your too many nested routines.

If you need to have a SCREEN command - close the gosub and put the 
SCREEN command as the next line in the @WHEN logic.

I hope that was clear enough.  I will be glad to expand if you do not 
follow.  I know you are new to filePro.

Nancy
RETURN


On 5/30/2013 8:59 PM, James Flanagan wrote:
> All:
>
> I am new to the group, so if this has been asked and answered previously, it would have been prior to my joining.
>
> I program filepro using a lot of nest gosubs because i find that it keeps my code very easy to read and review.  That said, i am aware of the limit of 16 nested gosubs, and have tried to program within that limitation.  However, a client has managed to unearth a particular path of usage that results in the "too many nested gosubs error".  However, i have not been able replicate what the client is seeing thus far.
>
> is there anything like a system maintained field within Filepro that will tell you how many nested gosubs deep you are at a given time that i could show on the screen for debug purposes?  If not, does anyone have an idea of how to do something similar to this without having to modify the code at each and every gosub (there could literally be 100's) to add and subtract from a counting variable.  Thanks in advance for your contributions to this.
>
> James Flanagan
> Flantec.com
>
> email:	James at Flantec.com
> mobile:	760-458-8498
> home: 	219-221-6219
> text:		7604588498 at txt.att.net
>
> aim:		Flantec
> oovoo:	Flantec
> Skype:	Flantec
> ichat:	Flantec at mac.com
>
> home:	1901 Cidermill Road
> 		Michigan City, IN 46360
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20130530/d8e2c895/attachment.html
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>

-- 
Nancy Palmquist         MOS & filePro Training Available
Virtual Software Systems    Web Based Training and Consulting
PHONE: (412) 835-9417           Web site:  http://www.vss3.com



More information about the Filepro-list mailing list