1 03/31/83  get_entry_arg_descs_
  2 
  3 
  4 This subroutine returns information about the calling sequence of a
  5 procedure entry point.
  6 
  7 Entry points in get_entry_arg_descs_:
  8    (List is generated by the help command)
  9 
 10 
 11 :Entry: get_entry_arg_descs_: 02/01/83  get_entry_arg_descs_
 12 
 13 
 14 Function: given a pointer to the entry sequence or segdef of a
 15 procedure entry point, returns a list of argument descriptors
 16 describing the parameters of the entry point.
 17 
 18 
 19 Syntax:
 20 declare get_entry_arg_descs_ entry (ptr, fixed bin, (*) ptr,
 21      fixed bin(35));
 22 call get_entry_arg_descs_ (entry_ptr, nargs, desc_ptrs, code);
 23 
 24 
 25 Arguments:
 26 entry_ptr
 27    points to the entry sequence or segdef of the procedure entry point
 28    whose parameter descriptors are to be described.  (Input)
 29 nargs
 30    is the number of parameters declared in the procedure entry point.
 31    (Output)
 32 desc_ptrs
 33    is an array of pointers to the argument descriptors describing the
 34    declared parameters of the entry point.  If dimension (desc_ptrs, 1)
 35    is less than nargs, the pointers identify the first dimension
 36    (desc_ptrs, 1) parameter descriptors.  (Output)
 37 code
 38    is a standard status code.  It can be:
 39    error_table_$nodescr
 40       the entry point did not have parameter descriptors.  (Output)
 41 
 42 
 43 Notes:
 44 For some version 0 object segments, a code of zero is returned, nargs
 45 is set, but the descriptor pointers in desc_ptrs are null.
 46 
 47 
 48 :Entry:  info:  02/01/83 get_entry_arg_descs_$info
 49 
 50 
 51 Function:  This entry point, given a pointer to the entry sequence or
 52 segdef of a procedure entry point, returns a list of argument
 53 descriptors describing the parameters of the entry point, plus a set of
 54 entry sequence flags which further describe the entry point.
 55 
 56 
 57 Syntax:
 58 declare get_entry_arg_descs_$info entry (ptr, fixed bin, (*) ptr, ptr,
 59      fixed bin(35));
 60 call get_entry_arg_descs_$info (entry_ptr, nargs, desc_ptrs,
 61      entry_desc_info_ptr, code);
 62 
 63 
 64 Arguments:
 65 entry_ptr
 66    points to the entry sequence or segdef of the procedure entry point
 67    whose parameter descriptors are to be described.  (Input)
 68 nargs
 69    is the number of parameters declared in the procedure entry point.
 70    (Output)
 71 desc_ptrs
 72    is an array of pointers to the argument descriptors describing the
 73    declared parameters of the entry point.  If dimension (desc_ptrs, 1)
 74    is less than nargs, the pointers identify the first dimension
 75    (desc_ptrs, 1) parameter descriptors.  (Output)
 76 entry_desc_info_ptr
 77    points to the entry_desc_info structure described under "Notes"
 78    below.  (Input)
 79 code
 80    is a standard status code.  It can be:
 81    error_table_$nodescr
 82       the entry point did not have parameter descriptors.  (Output)
 83 
 84 
 85 Notes:
 86 The entry_desc_info_ptr argument of get_entry_arg_descs_$info points to
 87 the structure shown below.  This structure is declared in
 88 entry_desc_info.incl.pl1.
 89 
 90    dcl 1 entry_desc_info          aligned based(entry_desc_info_ptr),
 91          2 version                fixed bin,
 92          2 flags,
 93           (3 basic_indicator,
 94            3 revision_1,
 95            3 has_descriptors,
 96            3 variable,
 97            3 function)            bit(1) unaligned,
 98            3 pad                  bit(13) unaligned,
 99        entry_desc_info_version_1  fixed bin int static
100                                   options(constant) init(1),
101        entry_desc_info_ptr        ptr;
102 
103 
104 Structure elements:
105    version
106       is the version number of this structure.  The current version
107       number is 1.  The named constant, entry_desc_info_version_1
108       should be used to set this version number.
109    flags
110       are the flags which further describe the procedure entry point.
111    basic_indicator
112       is on if the entry point is in a program written in the BASIC
113       language.
114    revision_1
115       is on if the entry sequence has version 1 descriptor data.
116    has_descriptors
117       is on if the entry sequence has argument descriptors describing
118       its parameters.
119 
120 
121    variable
122       is on if the entry point accepts an undefined number of
123       arguments, and has been declared with the options(variable)
124       attribute.  This flag will usually be off for entry points in
125       command and active function procedures, even though these
126       procedures accept a variable number of arguments.  Command and
127       active function procedures usually do not declare their entry
128       points with explicit parameters or with the options(variable)
129       attribute.
130    function
131       is on if the procedure entry point is a function which returns a
132       value.  The final parameter argument descriptor describes this
133       return value.
134    entry_desc_info_version_1
135       is a named constant which the caller should use to set the
136       version number in the structure above.
137    entry_desc_info_ptr
138       points to the structure above.
139 
140 
141 :Entry:  text_only:  02/01/83 get_entry_arg_descs_$text_only
142 
143 
144 Function:  This entry point, given a pointer to the entry sequence of a
145 procedure entry point, returns a list of argument descriptors
146 describing the parameters of the entry point.  It differs from the
147 get_entry_arg_descs_ entry point, in that it assumes that it is given a
148 pointer to an entry sequence in the text section of the procedure,
149 rather than checking to see if it was given a pointer to a segdef.
150 
151 
152 Syntax:
153 declare get_entry_arg_descs_$text_only entry (ptr, fixed bin, (*) ptr,
154      fixed bin(35));
155 call get_entry_arg_descs_$text_only (entry_ptr, nargs, desc_ptrs,
156      code);
157 
158 
159 Arguments:
160    The arguments are the same as for the get_entry_arg_descs_ entry
161    point above.  If entry_ptr does not point to an entry point in the
162    text section, then error_table_$nodescr is returned as the value of
163    code.
164 
165 
166 :Entry:  text_only_info:  02/01/83 get_entry_arg_descs_$text_only_info
167 
168 
169 Function:  This entry point, given a pointer to the entry sequence of a
170 procedure entry point, returns a list of argument descriptors
171 describing the parameters of the entry point, plus a set of entry
172 sequence flags which further describe the entry point.  It differs from
173 the get_entry_arg_descs_$info entry point, in that it assumes that it
174 is given a pointer to an entry sequence in the text section of the
175 procedure, rather than checking to see if it was given a pointer to a
176 segdef.
177 
178 
179 Syntax:
180 declare get_entry_arg_descs_$text_only_info entry (ptr, fixed bin, (*)
181      ptr, ptr, fixed bin(35));
182 call get_entry_arg_descs_$text_only_info (entry_ptr, nargs, desc_ptrs,
183      entry_desc_info_ptr, code);
184 
185 
186 Arguments:
187    The arguments are the same as for the get_entry_arg_descs_$info
188    entry point above.