|
SOLUTIONS
|
MATHEMATICA FILE
file.tm
file.tm
is a MathLink template file.
DetailsDetails
- MathLink template files contain templates for linking external C functions to Mathematica functions.
- Each template can contain the following:
-
:Begin: begin the template for a particular function :Function: the name of the function in the external program :Pattern: the pattern to be defined to call the function :Arguments: the arguments to the function :ArgumentTypes: the types of the arguments to the function :ReturnType: the type of value returned from the function :End: end the template :Evaluate: Mathematica input to evaluate when the function is installed ::text treat as a comment - Arbitrary C code can be interspersed between templates in a .tm file.
- The following argument and return type specifications can be used:
-
Integer16 short Integer32 int Integer64 mlint64 Real32 float Real64 double Real128 mlextended_double Integer16List short*, int (length) Integer32List int*, int (length) Integer64List mlint64*, int (length) Real32List float*, int (length) Real64List double*, int (length) Real128List mlextended_double*, int (length) String char* ByteString unsigned char* and int (length) UCS2String unsigned short* UTF8String unsigned char*, int (bytes), int (characters) UTF16String unsigned short*, int (length), int (characters) UTF32String unsigned int*, and int (length) Symbol char* ByteSymbol unsigned char*, int (length) UCS2Symbol unsigned short*, int (length) UTF8Symbol unsigned char*, int (bytes), int (characters) UTF16Symbol unsigned short*, int (length), int (characters) UTF32Symbol unsigned int*, int (length) ThisLink MLINK $CurrentLink MLINK Manual void - MathLink template files are converted to C code using mprep. They are also processed automatically by mcc when available.
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
