4
/*--------------------------------------------------------
5
* intview: interface for C displ function
6
* should provide [X,Y,Z]=view(X,Y,Z) at Scilab level
8
*--------------------------------------------------------*/
10
extern void displ __PARAMS((double *a, int ma, int na, int *b, int mb, int nb, char *c, int mc, int nc));
15
static int l1, m1, n1, l2, m2, n2, m3, n3, l3;
16
static int minlhs=1, maxlhs=3, minrhs=3, maxrhs=3;
18
/* Check number of inputs (rhs=3) and outputs (lhs=3) */
19
CheckRhs(minrhs,maxrhs) ;
20
CheckLhs(minlhs,maxlhs) ;
22
/* Get X (1 ,double), Y (2, int) and C (3, string) */
23
GetRhsVar(1, "d", &m1, &n1, &l1);
24
GetRhsVar(2, "i", &m2, &n2, &l2);
25
GetRhsVar(3, "c", &m3, &n3, &l3);
27
/* Call display function
28
stk(l1)->X (double), istk(l2)->Y (int), cstk(l3)->Z (char) */
29
displ(stk(l1), m1, n1, istk(l2), m2, n2, cstk(l3), m3, n3);
31
/* Return variables */
38
/*--------------------------------------------------------
40
*--------------------------------------------------------*/
42
void displ(a, ma, na, b, mb, nb, c, mc, nc)
43
double *a; int *b; char *c;
44
int ma, na, mb, nb, mc, nc;
46
sciprint("First parameter (matrix) is %i x %i:\r\n",ma,na);
47
sciprint("its (1,1) entry is %e (double).\r\n", a[0]);
48
sciprint("Second parameter (matrix) is %i x %i:\r\n",mb,nb);
49
sciprint("its (1,1) entry is %i (int).\r\n", b[0]);
50
sciprint("Third parameter (string) is %i character long: it is the string \"%s\"\r\n",mc*nc, c);