externalproc binds an external code to a Sollya procedure


externalproc(identifier, filename, argumenttype -> resulttype) : (identifier type, string, type type, type type) -> void



Example 1:

   > bashexecute("gcc -fPIC -Wall -c externalprocexample.c");
   > bashexecute("gcc -fPIC -shared -o externalprocexample externalprocexample.o");
   > externalproc(foo, "./externalprocexample", (integer, integer) -> integer);
   > foo;
   foo(integer, integer) -> integer
   > foo(5, 6);
   > verbosity = 1!;
   > foo();
   Warning: at least one of the given expressions or a subexpression is not correctly typed
   or its evaluation has failed because of some error on a side-effect.
   > a = foo;
   > a(5,6);
See also: library, libraryconstant, externalplot, bashexecute, void, constant, function, range, integer, string, boolean, list of
Go back to the list of commands