Name:

externaldata binds an external data symbol to a Sollya identifier

Library name:

    sollya_obj_t sollya_lib_externaldata(char *, void *, void (*)(void *));

Usage:

externaldata(identifier, filename) : (identifier type, string) -> void

Parameters:

Description:

Example 1:

   > bashexecute("gcc -fPIC -Wall -I.. -I. -c externaldataexample.c");
   > bashexecute("gcc -fPIC -shared -o externaldataexample externaldataexample.o");
   > externaldata(magic, "./externaldataexample");
   > magic;
   magic
   > print(magic);
   magic
   > magic == magic;
   true
   > magic == 17;
   false
   > zauberei = magic;
   > zauberei;
   magic
   > zauberei == magic;
   true

Example 2:

   > bashexecute("gcc -fPIC -Wall -I.. -I. -c externaldataexample.c");
   > bashexecute("gcc -fPIC -shared -o externaldataexample externaldataexample.o");
   > externaldata(magic, "./externaldataexample");
   > externalproc(printMagic, "./externaldataexample", object -> void);
   > zauberei = magic;
   > printMagic;
   printMagic
   > printMagic(magic);
   The magic is 17
   > printMagic(magic);
   The magic is 18
   > printMagic(zauberei);
   The magic is 19
   > procedure magicAsParameter(m) {
       m;
       printMagic(m);
       m;
     };
   > magicAsParameter(magic);
   magic
   The magic is 20
   magic
   > magicAsParameter(zauberei);
   magic
   The magic is 21
   magic
See also: library, libraryconstant, externalproc, externalplot, bashexecute, void, constant, function, range, integer, string, boolean, list of, object
Go back to the list of commands