MLGetType has been replaced by WSGetType.
int MLGetType(MLINK link)
gets the type of the current object on the MathLink connection specified by link.
- Unlike MLGetNext(), MLGetType() does not advance to the next object on link, so it can be safely called more than once for the same object.
- The following types can be returned:
MLTKERR error MLTKINT integer MLTKFUNC composite function MLTKREAL approximate real number MLTKSTR character string MLTKSYM symbol MLTKOLDINT integer from older versions of the MathLink library MLTKOLDREAL approximate real number from older versions of the MathLink library MLTKOLDSTR character string from older versions of the MathLink library MLTKOLDSYM symbol from older versions of the MathLink library MLTKOPTSTR character string from newer versions of the MathLink library MLTKOPTSYM symbol from newer versions of the MathLink library
- MLTKINT and MLTKREAL do not necessarily signify numbers that can be stored in C int and double variables.
- MLGetType() is declared in the MathLink header file mathlink.h.
Basic Examples (1)
/* read the type of the expression from a link */
void f(MLINK lp)
/* read the integer */
/* read the floating point number */
/* read the string. */
/* ... */