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

Home -> Community -> Usenet -> c.d.o.misc -> Re: pl/sql function

Re: pl/sql function

From: Keld Nielsen <keldnielsen_at_image.dk>
Date: Tue, 23 Jul 2002 02:11:50 +0200
Message-ID: <9c1%8.33892$Yf1.1428829@news010.worldonline.dk>


personally, I never liked the idea of having an IN OUT parameter
In my book it's poor not to say bad programming practice. Ie.
never tamper with the data you receive. It's, still in my book, either IN or OUT. You can check if
the data has changed, yes, but why ?
And modifying an item in a record-pl/sql table (unless I have misunderstood something here) should be needless to say.

Regards,
Keld

"Rauf Sarwar" <rs_arwar_at_hotmail.com> wrote in message
news:92eeeff0.0207221443.4d597c99_at_posting.google.c om...
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
news:<ujnb1jl1k4ap4a_at_corp.supernews.com>...
> > "Tim Cross" <tcross_at_nospam.une.edu.au> wrote
in message
> > news:8765z88tn4.fsf_at_blind-bat.une.edu.au...
> > > "Peter" <depend3_at_yahoo.com> writes:
> > >
> > > > Is it possible to return two values when
you write a function without
> > > > concat? If yes, how do you do this?
> > > > Thanks.
> > > >
> > > >
> > > As far as I know, you can only return one
"thing" - however that
> > > "thing" could be a record which contains
multiple other "things" - so
> > > if you need to return two (or more) distinct
values, define a record
> > > which represents the values to be returned,
put those values in the
> > > record and return that.
> > >
> > > Alternatively, make one of the values you
want to return an IN OUT
> > > parameter to the function call and put one
value in that parameter and
> > > return the other.
> > >
> > > Tim
> > > --
> > >

> >
> > The latter of which is definitely programming
with side-effects, and as this
> > usually results in hard-to-debug programs,
should be considered bad
> > programming practice. If you want to make a
gordian knot of your programs,.
> > fine with me, but please don't recommend this
to others.

> >

> > Regards
>
>
> Care to elaborate on this. Are you saying that
using OUT parameters in
> a function is a "bad programming practice"?
>
> Besides not being able to use in a select
statement...I am curious as
> to what other "side-effects" are you referring to?
>
> //Rauf Sarwar Received on Mon Jul 22 2002 - 19:11:50 CDT

Original text of this message

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