Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Recursive Function

RE: Recursive Function

From: R Zijlstra <rmsah_at_xs4all.nl>
Date: Fri, 7 May 2004 20:07:51 +0200
Message-Id: <200405071807.i47I7aUf044504@smtp-out3.xs4all.nl>


Jared,

Two yrs ago I had to unbug some forms, which eventually led to pl/sql code in packages. No problem, but the original developer was gone, and she did not leave any documentation behind. (you know, one of these firms where they get a blank stare in their eyes when you mention documentation) Problem was that she also had the habit of making functions in the package that spanned several pages. And had an X number of return statements AND also sometimes had parameters that were changed on return. Well, she could code nicely -not a word about that-, but you probably can imagine the amount of time (and therefore money!) things like this consumes, when you have to make changes. For precisely this reason I completely agree with Stephen Feuerstein. Of course the old rule that a proc/function may not be longer as one screen is also a thing to adhere to.

(I must admit that it would have been not as bad if there had been documentation.)

Rob Zijlstra


-----Original Message-----

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Juan Cachito Reyes Pacheco
Sent: Friday, May 07, 2004 2:53 PM
To: oracle-l_at_freelists.org
Subject: Re: Recursive Function

Hi Jared
The problem Jared is not in programming. If you have a big function with several returns, is more difficult to understand 2 years later.
Now if it have several returns, it is either impossible.

If for example you don't use a notation to differentiate distinct kind of variables like the first letter (lanswer, cCharacter, etc) the code still will be readeable, but sometimes you will have to go to the declaration to know which kind of variable it is.

About
<I've written convoluted code in the past to try and use the <'only 1 return' rule, and decided it was silly. we have long long code, and have only one return, I don't know you code so I can give an opinion about it.

But definetively an ordered code is easier to debug,and to avoid making mistakes.

:)

Juan Carlos Reyes Pacheco
OCP
Database 9.2 Standard Edition



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html


Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Fri May 07 2004 - 13:04:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US