4
//[1] call intersci with Makefile
8
V=G_make('ex16fi.c','ex16fi.c');
10
//[2] run the builder generated by intersci.
12
// Since files and libs were nor transmited
14
// to intersci we give them here
16
files = ['ex16fi.o';'ex16c.o'];
20
exec ex16fi_builder.sce
22
// generated with intersci
24
ilib_name = 'libex16fi' // interface library name
30
table =["ext16ca","intsext16ca";
31
"ext16cb","intsext16cb";
32
"ext16cc","intsext16cc";
33
"ext16cd","intsext16cd";
34
"ext16ce","intsext16ce";
35
"ext16cf","intsext16cf";
36
"ext16cg","intsext16cg";
37
"ext16ch","intsext16ch"];
39
ilib_build(ilib_name,table,files,libs);
40
generate a gateway file
41
generate a loader file
42
generate a Makefile: Makelib
47
//[3] run the loader to load the interface
49
// Note that the file loader.sce
51
// is changed each time you run a demo
53
// if several0.desc are present in a directory
57
// generated by builder.sce: Please do not edit this file
59
// ------------------------------------------------------
61
libex16fi_path=get_file_path('loader.sce');
63
functions=[ 'ext16ca';
73
addinter(libex16fi_path+'/libex16fi.so','libex16fi',functions);
74
Loading shared executable0./libex16fi.so
85
//[4] test the loaded function
87
//Run Scilab functions:
93
// simple matrix argument
98
if or(b<>~a) then bugmes();quit;end
101
// matrix and return a matrix in a list
106
if or(b(1)<>~a) then bugmes();quit;end
109
// new matrix in intersci
114
if or(b<>~a) then bugmes();quit;end
117
// new matrix returned in a list
122
if or(b(1)<>~a) then bugmes();quit;end
125
// list argument with a matrix
130
if or(b<>~a) then bugmes();quit;end
133
// list argument + list output
138
if or(b(1)<>~a) then bugmes();quit;end
146
if or(b<>[%f,%t;%t,%f;%f,%t]) then bugmes();quit;end
154
if or(b(1)<>[%f,%t;%t,%f;%f,%t]) then bugmes();quit;end