Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Manual argument type with MathLink C interface
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
szhorvat@gmail.com

Posts: 1,416
Registered: 4/8/06
Manual argument type with MathLink C interface
Posted: Feb 26, 2013 1:09 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

When using the MathLink C interface, if we want to get arguments
manually, we need to put the following in the template (.tm) file:

:ArgumentTypes: { Manual }
:ReturnType: Manual

Note the braces around {Manual}. I accidentally used

:ArgumentTypes: Manual
:ReturnType: Manual

instead.

mprep does 'compile' this template file without errors, and generates
valid C code for it, but it doesn't have the same behaviour as the
standard :ArgumentTypes: {Manual} specification.

Diffing the outputs shows only one difference: the f_nargs member of
the "func" struct is set to -1 for this function with :ArgumentTypes:
Manual, while with {Manual} it is 0.

Question: Is :ArgumentTypes: Manual meaningful, and if yes, what is
its use? Is there going to be anything meaningful on the link that I
can MLGet, and if yes, what?


Admittedly, this is mostly of theoretical interest for me. I was just
curious why mprep didn't complain about this if it was something that
really wasn't allowed. Perhaps it does have some use.





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.