WSLINK (C Function)

is a WSTP type representing a WSTP link object.

Details

  • is analogous to LinkObject in Mathematica.
  • WSLINK is defined in the file wstp.h, which should be included in the source code for any WSTP-compatible program.

Examples

Basic Examples  (1)

#include "wstp.h"

int main(int argc, char **argv)
{
    WSENV ep;
    WSLINK lp;
    long error;

    ep = WSInitialize((WSEnvironmentParameter)0);
    if(ep == (WSENV)0)
        { /* unable to initialize environment */ }

    lp = WSOpenArgcArgv(ep, argv, argv + argc, &error);
    if(lp == (WSLINK)0 || error != WSEOK)
        { /* unable to create link */ }

    /* ... */

    WSClose(lp);
    WSDeinitialize(ep);
    return 0;
}