~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to examples/intersci-examples-so/ex17.dia.ref

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
// Example ex17
 
3
 
 
4
//[1] call intersci with Makefile
 
5
 
 
6
//
 
7
 
 
8
V=G_make('ex17fi.c','ex17fi.c');
 
9
 
 
10
//[2] run the builder generated by intersci.
 
11
 
 
12
//    Since files and libs were nor transmited
 
13
 
 
14
//    to intersci we give them here
 
15
 
 
16
files = ['ex17fi.o','ex17c.o'];
 
17
 
 
18
libs  = [] ;
 
19
 
 
20
exec ex17fi_builder.sce
 
21
 
 
22
// generated with intersci
 
23
 
 
24
ilib_name = 'libex17fi'         // interface library name
 
25
 ilib_name  =
 
26
 
 
27
 libex17fi   
 
28
 
 
29
 
 
30
table =["ex17","intsex17"];
 
31
 
 
32
ilib_build(ilib_name,table,files,libs);
 
33
   generate a gateway file
 
34
   generate a loader file
 
35
   generate a Makefile: Makelib
 
36
   running the makefile
 
37
 
 
38
 
 
39
 
 
40
//[3] run the loader to load the interface
 
41
 
 
42
//    Note that the file loader.sce
 
43
 
 
44
//    is changed each time you run a demo
 
45
 
 
46
//    if several0.desc are present in a directory
 
47
 
 
48
exec loader.sce
 
49
 
 
50
// generated by builder.sce: Please do not edit this file
 
51
 
 
52
// ------------------------------------------------------
 
53
 
 
54
libex17fi_path=get_file_path('loader.sce');
 
55
 
 
56
functions=[ 'ex17';
 
57
];
 
58
 
 
59
addinter(libex17fi_path+'/libex17fi.so','libex17fi',functions);
 
60
Loading shared executable0./libex17fi.so
 
61
 
 
62
shared archive loaded
 
63
 
 
64
Linking libex17fi 
 
65
 
 
66
Interface 0 libex17fi
 
67
 
 
68
 
 
69
 
 
70
 
 
71
//[4] test the loaded function
 
72
 
 
73
L=list('poo',[10,20],[%t,%f]);
 
74
 
 
75
L1=ex17(L);
 
76
 
 
77
 
 
78
if L1(1)<>L(1) then bugmes();quit;end
 
79
 
 
80
if norm(L1(2)-L(2)) > 1.e-8 then bugmes();quit;end
 
81
 
 
82
if L1(3)<>L(3) then bugmes();quit;end
 
83