WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center
Wolfram Language Home Page »

WSOpenString (C Function)

WSLINK WSOpenString(WSENV env,const char *string,int *errno)

opens a WSTP connection taking parameters from a character string.

Details

  • WSInitialize() must be called before WSOpenString.
  • WSOpenString() takes a single string instead of the array used by WSOpenArgcArgv().
  • Arguments in the string are separated by spaces.
  • On some computer systems, giving NULL in place of the string pointer will cause arguments to be requested interactively, typically through a dialog box.
  • WSOpenString() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (1)

#include "wstp.h"

int main()
{
WSENV env;
WSLINK link;
int error;

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

link = WSOpenString(env, "/usr/local/bin/math -mathlink", &error);
if(link == (WSLINK)0 || error != WSEOK)
{ /* unable to create link to the Kernel */ }

/* ... */

WSClose(link);
WSDeinitialize(env);

return 0;
}

See Also

C Functions: WSActivate()   WSOpenArgcArgv()

Tech Notes

History

Introduced in 1996 (3.0) | Updated in 2007 (6.0)

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /