Purpose
Get the procedure/function
information.
Synopsis
int getprocinfo(XPRMproc proc, const char **partyp, int *nbpar,
int *type);
Arguments
|
proc
|
Reference to a procedure or function
|
|
partyp
|
Returned string of parameter types
|
|
nbpar
|
Returned number of parameters
|
|
type
|
Returned type of the function or XPRM_TYP_NOT
for a procedure
|
Return value
0 if successful, 1 otherwise.
Example
Further information
This function provides information about a procedure or function.
The type can be decoded like for any other identifier of a model. Note
that a procedure has no return type (type=
XPRM_TYP_NOT).
The string of parameter types is a text string describing which
parameters are expected by the function, it is its
signature. This string is composed with the following
characters:
|
i
|
an integer
|
|
r
|
a real
|
|
s
|
a text string
|
|
b
|
a Boolean
|
|
v
|
a decision variable (type mpvar)
|
|
c
|
a linear constraint (type linctr)
|
|
I
|
a range set
|
|
a
|
an array (of any kind)
|
|
e
|
a set (of any type)
|
|
l
|
a list (of any type)
|
|
|xxx|
|
external type named `xxx'. A type code
may also be given as `%???' where `???'
(3 hexadecimal digits) is the code number
|
|
!xxx!
|
the set named `xxx'
|
|
Andx.t
|
an array indexed by
`ndx' of the type `t'. `ndx'
is a string describing the type of each indexing set.
|
|
Et
|
a set of type `t'
|
|
Lt
|
a list of type `t'
|
|
*
|
function with variable number of parameters
(this character is the last one of the string)
|
For instance, the procedure:
proc(n:integer, tab:array(range, real, myset) of string, flag:boolean)
has the signature ``
iAIr!myset!.sb''.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.