× 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.



This reminded me of an article I read recently re: programming standards....



Rule 4 (recursion)

There shall be no direct or indirect use of recursive function calls. [MISRA-C:2004 Rule 16.2; Power of Ten Rule 1]

The presence of statically verifiable loop bounds and the absence of recursion prevent runaway code, and help to secure predictable performance for all tasks. The absence of recursion also simplifies the task of deriving reliable bounds on stack use.



Clearly, this organization understands the inherent dangers of recursion.



The standards document was from Jet Propulsion Laboratory. Don’t want the Mars Rovers to have a system crash!





-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Thursday, February 14, 2013 2:00 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Recursion in RPG



<snip>

In my opinion, the article you cite does not provide a good example of recursion, or explain why you'd want to use it. Seems to me his example would make more sense if it was just run in a loop instead of run recursively. Recursion only comes up occasionally in business programming. Something like a bill of materials is an example where recursion makes sense... but aside from that, recursion is pretty rare in business programming.

</snip>




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.