Suppose that an expression like
f[something, 12]
was sent to a MathLink link, and we need to read off only the second part of f
, which has a known type (e.g. integer). How can the first part, something
, be discarded? something
could be an atomic or compound expression of any kind. I need to do this in C.
Example:
int argc = 2;
if (! MLTestHeadWithArgCount(link, "f", &argc)) {
// fail
}
// how do I discard the complete next expression here, whether it's atomic or compound?
int i;
MLGetInteger32(link, &i); // get the integer
MLTransferExpression(NULL, link)
, but haven't tried yet. $\endgroup$