MLLinkName()

const char * MLLinkName(MLINK link)
returns the name string used to create the link.

DetailsDetails

  • MathLink links are created using a combination of link mode, link protocol, and other options. The link name provides necessary information for the link mode and link protocol used to create the link.
  • MLLinkName() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples (4)Basic Examples (4)

Use the Pipes protocol on Unix or Mac OS X to launch a link:

In[1]:=
Click for copyable input
Out[1]=

The link name contains the pathname and command-line arguments to use to connect to the link:

In[2]:=
Click for copyable input
Out[2]=

Use the TCPIP protocol to create a link:

In[1]:=
Click for copyable input
Out[1]=

The link name contains the port and hostname pairs to use to establish the TCP connection:

In[2]:=
Click for copyable input
Out[2]=

Use the SharedMemory protocol to create a link:

In[1]:=
Click for copyable input
Out[1]=

The link name contains the name of the shared memory object:

In[2]:=
Click for copyable input
Out[2]=

Declare a const char * variable and get the link name:

#include "mathlink.h"

/* read a link's name */

const char * f(MLINK lp)
{
    return MLLinkName(lp);
}
New to Mathematica? Find your learning path »
Have a question? Ask support »