|
SOLUTIONS
|
MATHEMATICA MATHLINK C FUNCTION
MLAbort
DetailsDetails
- LinkInterrupt
can be used to send an abort interrupt from Mathematica to a program connected to a particular link. - MLAbort is set to 1 if the program has received an abort message; otherwise the value is 0.
- MLAbort() is declared in the MathLink header file mathlink.h.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
#include <math.h>
#include "mathlink.h"
/* totals the numbers and calculates the square root */
double f(double* list, int len)
{
double sum;
while(len--)
{
sum += *list++;
/* check for the abort */
if(MLAbort) return (double)0;
}
return sqrt(sum);
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
