1 12/01/86  declare, dcl
 2 
 3 Syntax:  dcl fn_name fn_type
 4 
 5 
 6 Function:  allows the user to declare a nonstandard function which may
 7 be invoked in a subsequent query.  A nonstandard function is any
 8 function not included in built-in functions listed in Section 2, and
 9 may be user-written or may be provided by the local installation.  Two
10 types of functions may be declared:  set functions which operate on
11 multiple sets of values and scalar functions which operate on one
12 occurrence of a set of values.
13 
14 
15 Arguments:
16 fn_name
17    is the name of the function being declared.  The fn_name must be the
18    name of an object segment that can be found using the search rules
19    currently in effect.
20 fn_type
21    is the type of the function being declared.  Two types are
22    permitted, set or scalar.  A set-type-function operates on multiple
23    sets of selected values, whereas a scalar-type-function operates on
24    one set of specified values.
25 
26 
27 Notes:  Scalar functions can accept column values as input from one
28 table only, provided no row designators are used.  If row designators
29 are specified, column names must all be qualified with the same row
30 designator.
31 
32 
33 Several built-in functions are provided as a standard part of linus.
34 It is not necessary to declare built-in functions.  If a declare
35 function has the same name as a built-in function, the declared
36 function, rather than the built-in function, is invoked when the
37 function name is referenced.