Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Manual argument type with MathLink C interface

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129922] Manual argument type with MathLink C interface
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Tue, 26 Feb 2013 01:10:13 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

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.




  • Prev by Date: Re: Mathematica and Lisp
  • Next by Date: remove the decimal dot from ticks?
  • Previous by thread: Re: Real and Imaginary Parts of complex functions
  • Next by thread: remove the decimal dot from ticks?