× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.






On Tue, 10 Nov 1998, Joe Giusto wrote:

> 
> Also be careful with recursive subroutine calls.  The compiler let me do it
> but I threw my program into an endless loop.  It seemed to me at the time
> that the subroutine "forgot" where it came from the first time.

Joe,

coding subrpocedure or function that is going to be called recursively
or autorecursively, you have to take care about "exit condition". Your
subprocedure or function must "know" when to "move back". Maximum number
of possible recursions depends of available memory and processor and few
other things, but I was going as deep as 20000 call stack entries.

BTW, thanks ppl. in RPG research labs for making that wonderful
mathematical principal avilable in RPG, our job became much more
interesting since.

Vanya
 
> 
> Joe Giusto II
> Patuxent Publishing Company
>  <mailto:jgiusto@patuxent.com> mailto:JGiusto@patuxent.com
> http://www.lifegoeson.com <http://lifegoeson.com> 
> 
> 
>       -----Original Message-----
>       From:   Stone, Brad V (TC) [SMTP:bvstone@taylorcorp.com]
>       Sent:   Tuesday, November 10, 1998 11:41 AM
>       To:     'MIDRANGE-L@midrange.com'
>       Subject:        RE: RPG & recursive call
> 
>       Recursion is not allowing in RPG/III.  It can be done in CL, or in
>       RPG/IV programs or subprocedures.
> 
>       Bradley V. Stone
>       Taylor Corporation - OASIS Programmer/Analyst   
>       bvstone@taylorcorp.com
> 
> 
>       > -----Original Message-----
>       > From: Eric Panissard [SMTP:EPanissard@idt.pf]
>       > Sent: Sunday, November 08, 1998 10:47 PM
>       > To:   MIDRANGE-L@midrange.com
>       > Subject:      RPG & recursive call
>       > 
>       > At first sorry for my poor english, I am located in French
> Polynesia
>       > ....
>       > 
>       > Is it possible to do a recursive call in an RPG III program ? If I
> try
>       > to do
>       > that by a simple CALL I have the message RPG8888.
>       > 
>       > 
>       > +---
>       > | This is the Midrange System Mailing List!
>       > | To submit a new message, send your mail to
> MIDRANGE-L@midrange.com.
>       > | To subscribe to this list send email to
> MIDRANGE-L-SUB@midrange.com.
>       > | To unsubscribe from this list send email to
>       > MIDRANGE-L-UNSUB@midrange.com.
>       > | Questions should be directed to the list owner/operator:
>       > david@midrange.com
>       > +---
>       +---
>       | This is the Midrange System Mailing List!
>       | To submit a new message, send your mail to
> MIDRANGE-L@midrange.com.
>       | To subscribe to this list send email to
> MIDRANGE-L-SUB@midrange.com.
>       | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
>       | Questions should be directed to the list owner/operator:
> david@midrange.com
>       +---
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
> 

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.