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

« back to all changes in this revision

Viewing changes to examples/intersci-examples-so/ex04.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 ex04
 
3
 
 
4
//[1] call intersci with Makefile
 
5
 
 
6
//
 
7
 
 
8
V=G_make('ex04fi.c','ex04fi.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 = ['ex04fi.o';'ex04f.o'];
 
17
 
 
18
libs  = [] ;
 
19
 
 
20
exec ex04fi_builder.sce
 
21
 
 
22
// generated with intersci
 
23
 
 
24
ilib_name = 'libex04fi'         // interface library name
 
25
 ilib_name  =
 
26
 
 
27
 libex04fi   
 
28
 
 
29
 
 
30
table =["contrb","intscontrb"];
 
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
libex04fi_path=get_file_path('loader.sce');
 
55
 
 
56
functions=[ 'contrb';
 
57
];
 
58
 
 
59
addinter(libex04fi_path+'/libex04fi.so','libex04fi',functions);
 
60
Loading shared executable0./libex04fi.so
 
61
 
 
62
shared archive loaded
 
63
 
 
64
Linking libex04fi 
 
65
 
 
66
Interface 0 libex04fi
 
67
 
 
68
 
 
69
 
 
70
 
 
71
 
 
72
 
 
73
//[4] test the loaded function
 
74
 
 
75
 
 
76
sys=ssrand(2,2,3,list('co',1));
 
77
 
 
78
n=contrb(sys,0.01);
 
79
 
 
80
if n <> 1 then bugmes();quit;end
 
81
 
 
82
 
 
83
 
 
84
 
 
85