getnextproc
getnextproc |
Purpose
Synopsis
XPRMproc getnextproc(XPRMproc proc);
Argument
proc
|
Reference to a procedure or function
|
Return value
A procedure or function reference or
NULL if no overloading subroutine is defined.
Example
The following code extract shows how to find the function
mosfct(i:integer,r:real):boolean.
int find_mosfct(XPRMcontext ctx) { XPRMalltypes fct; const char *partyp; int nbpar,type; if(XPRM_STR(mm->findident(ctx, "mosfct", &fct))==XPRM_STR_PROC) do { mm->getprocinfo(fct.proc, &partyp, &nbpar, &type); if((type==XPRM_TYP_BOOL) && (nbpar==2) && !strcmp(partyp,"ir")) return 1; fct.proc=mm->getnextproc(fct.proc); } while(fct.proc!=NULL); return 0; }
Further information
This function returns the following overloading defined for the given subroutine. A subroutine may be defined several times in a model with different sets of parameters. This function gives access to all the defined overloaded versions of a subroutine. Note that this function does not give access to any subroutines provided by modules.
Related topics