1
// Demo file for ext2f example
3
// builder code for ext2f.c
4
link_name = 'ext2f'; // functions to be added to the call table
5
flag = "f"; // ext2f is a C function
6
files = ['ext2f.o' ]; // objects files for ext2f
7
libs = []; // other libs needed for linking
9
// the next call generates files (Makelib,loader.sce) used
10
// for compiling and loading ext2f and performs the compilation
12
ilib_for_link(link_name,files,libs,flag);
14
// load new function code in the scope of call
15
// using the previously generated loader
18
// test new function through the call function
20
a=[1,2,3];b=[4,5,6];n=3;
21
c=call('ext2f',n,1,'i',a,2,'d',b,3,'d','out',[1,3],4,'d');
22
if norm(c-(sin(a)+cos(b))) > %eps then pause,end