Purpose
Set the function information array before calling a user function
Synopsis
procedure SLPsetuserfuncinfo(FuncInfo:array(AR:range) of integer,
CallerFlag:integer, nInput:integer, nOutput:integer, nDelta:integer, nInString:integer,
nOutString:integer)
Arguments
FuncInfo
|
The argument information array to be set up. This must be dimensioned at least xslp_funcinfosize
|
CallerFlag
|
an integer value which can be used for any purpose in the calling and called function
|
nInput
|
The number of values in the array of input arguments for the function to be called
|
nOutput
|
The number of values required from the function to be called
|
nDelta
|
The number of sets of partial derivatives to be calculated by the function to be called
|
nInString
|
The number of strings in the input string argument (argument 4 to the function being called)
|
nOutString
|
The number of strings in the output string argument (argument 5 to the function being called)
|
Example
The following code fragment caller flag to 99 (this can be picked up and
interpreted by the called function), the number of input values to 5, the number of return
values required to 1, and sets the remaining values to zero.
declarations
nArray:array(1..xslp_funcinfosize) of integer
end-declarations
SLPsetuserfuncinfo(nArray,99,5,1,0,0,0)
Further information
This function is used in conjunction with
SLPcalluserfunc
to allow direct calls to external functions from within Mosel. If
CallerFlag is set
to a nonzero value, the calling program can identify that it has been called directly
rather that from within an optimization, when
CallerFlag is always zero.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.