Initializing help system before first use

XPRBgetvartype

XPRBgetvartype


Purpose
Get the type of a variable.
Synopsis
int XPRBgetvartype(XPRBvar var);
Argument
var 
BCL reference to a variable.
Return value
XPRB_PL 
continuous;
XPRB_BV 
binary;
XPRB_UI 
general integer;
XPRB_PI 
partial integer;
XPRB_SC 
semi-continuous;
XPRB_SI 
semi-continuous integer;
-1 
an error has occurred.
Example
XPRBprob prob;
XPRBvar x1;
char vtype;
   ...
x1 = XPRBnewvar(prob, XPRB_UI, "abc3", 0, 100);
vtype = XPRBgetvartype(x1);
This returns the type of variable x1.
Further information
If the function exits successfully, the variable type is returned.
Related topics