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: A Question on the Basics of PL/SQL

Re: A Question on the Basics of PL/SQL

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Fri, 29 Jun 2001 11:52:45 -0700
Message-ID: <F001.0033DF5C.20010629115115@fatcity.com>

"MacGregor, Ian A." wrote:
>
> Functions are used when when a "value" must be returned. The quotes are around
>value because the return type is not necessarily scalar. Under most circumstances a
>function only returns one value. I believe in sticking to that rule, although Oracle
>does not always:
>
> Here's a line from the package header for dbms_standard:
>
> function dictionary_obj_name_list (object_list out ora_name_list_t)
> return binary_integer;
>
> The function returns both a binary integer and a table of varchar2(64)'s.

 Ian,

    You might see this in a kinder light if you consider that the 'return value' is not a return value proper but a status (which probably happens to be the number of items in the list). It must have been coded by an unreformed C developer (C knows no procedure, remember, only 'void' functions).

-- 
Regards,

Stephane Faroult
Oriole Corporation
Voice:  +44  (0) 7050-696-269 
Fax:    +44  (0) 7050-696-449 
Performance Tools & Free Scripts
--------------------------------------------------------------
http://www.oriole.com, designed by Oracle DBAs for Oracle DBAs
--------------------------------------------------------------
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jun 29 2001 - 13:52:45 CDT

Original text of this message

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