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

« back to all changes in this revision

Viewing changes to examples/intersci-examples-so/ex16.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 ex16
 
3
 
 
4
//[1] call intersci with Makefile
 
5
 
 
6
//
 
7
 
 
8
V=G_make('ex16fi.c','ex16fi.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 = ['ex16fi.o';'ex16c.o'];
 
17
 
 
18
libs  = [] ;
 
19
 
 
20
exec ex16fi_builder.sce
 
21
 
 
22
// generated with intersci
 
23
 
 
24
ilib_name = 'libex16fi'         // interface library name
 
25
 ilib_name  =
 
26
 
 
27
 libex16fi   
 
28
 
 
29
 
 
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"];
 
38
 
 
39
ilib_build(ilib_name,table,files,libs);
 
40
   generate a gateway file
 
41
   generate a loader file
 
42
   generate a Makefile: Makelib
 
43
   running the makefile
 
44
 
 
45
 
 
46
 
 
47
//[3] run the loader to load the interface
 
48
 
 
49
//    Note that the file loader.sce
 
50
 
 
51
//    is changed each time you run a demo
 
52
 
 
53
//    if several0.desc are present in a directory
 
54
 
 
55
exec loader.sce
 
56
 
 
57
// generated by builder.sce: Please do not edit this file
 
58
 
 
59
// ------------------------------------------------------
 
60
 
 
61
libex16fi_path=get_file_path('loader.sce');
 
62
 
 
63
functions=[ 'ext16ca';
 
64
            'ext16cb';
 
65
            'ext16cc';
 
66
            'ext16cd';
 
67
            'ext16ce';
 
68
            'ext16cf';
 
69
            'ext16cg';
 
70
            'ext16ch';
 
71
];
 
72
 
 
73
addinter(libex16fi_path+'/libex16fi.so','libex16fi',functions);
 
74
Loading shared executable0./libex16fi.so
 
75
 
 
76
shared archive loaded
 
77
 
 
78
Linking libex16fi 
 
79
 
 
80
Interface 0 libex16fi
 
81
 
 
82
 
 
83
 
 
84
 
 
85
//[4] test the loaded function
 
86
 
 
87
//Run Scilab functions:
 
88
 
 
89
 
 
90
a=[%t,%t;%f,%f];
 
91
 
 
92
 
 
93
// simple matrix argument
 
94
 
 
95
 
 
96
b=ext16ca(a);
 
97
 
 
98
if or(b<>~a) then bugmes();quit;end
 
99
 
 
100
 
 
101
// matrix and return a matrix in a list
 
102
 
 
103
 
 
104
b=ext16cb(a);
 
105
 
 
106
if or(b(1)<>~a) then bugmes();quit;end
 
107
 
 
108
 
 
109
// new matrix in intersci
 
110
 
 
111
 
 
112
b=ext16cc(a);
 
113
 
 
114
if or(b<>~a) then bugmes();quit;end
 
115
 
 
116
 
 
117
// new matrix returned in a list
 
118
 
 
119
 
 
120
b=ext16cd(a);
 
121
 
 
122
if or(b(1)<>~a) then bugmes();quit;end
 
123
 
 
124
 
 
125
// list argument with a matrix
 
126
 
 
127
 
 
128
b=ext16ce(list(a));
 
129
 
 
130
if or(b<>~a) then bugmes();quit;end
 
131
 
 
132
 
 
133
// list argument + list output
 
134
 
 
135
 
 
136
b=ext16cf(list(a));
 
137
 
 
138
if or(b(1)<>~a) then bugmes();quit;end
 
139
 
 
140
 
 
141
// cboolf
 
142
 
 
143
 
 
144
b=ext16cg();
 
145
 
 
146
if or(b<>[%f,%t;%t,%f;%f,%t]) then bugmes();quit;end
 
147
 
 
148
 
 
149
// cboolf + list
 
150
 
 
151
 
 
152
b=ext16ch();
 
153
 
 
154
if or(b(1)<>[%f,%t;%t,%f;%f,%t]) then bugmes();quit;end
 
155
 
 
156
 
 
157
 
 
158