File: ex17intc.c

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (42 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "stack-c.h"

/**************************************************
 * Shows how to back convert data to Scilab internal formal 
 * when data was modified when extracted (for example when 
 * using 'i','r','z' in GetRhsVar ) 
 **************************************************/

int intex17c_1(fname)
  char* fname;
{ 
  int m,n,m1,n1,l1,m2,n2,l2,m3,n3,l3,m4,n4,l4,m5,n5,l5;
  int it1,lc1, l;

  CheckRhs(1,1);
  CheckLhs(1,1);

  GetRhsVar(1,"l",&m,&n,&l);
  CheckLength(1,m,5);
  GetListRhsCVar(1,1,"i",&it1,&m1,&n1,&l1,&lc1);
  GetListRhsVar(1,2,"i",&m2,&n2,&l2);
  GetListRhsVar(1,3,"c",&m3,&n3,&l3);
  GetListRhsVar(1,4,"r",&m4,&n4,&l4);
  GetListRhsVar(1,5,"z",&m5,&n5,&l5);

  /* first list argument cannot be returned directly 
   * since the previous GetListRhsVar have performed 
   * data conversion. But we can back-convert data 
   * before returning the list. 
   */ 

  /* Backconvert to scilab internal default format */

  ConvertData("i",m1*n1*(it1+1),l1);
  ConvertData("i",m2*n2,l2);
  ConvertData("c",m3*n3,l3);
  ConvertData("r",m4*n4,l4);
  ConvertData("z",m5*n5,l5);

  LhsVar(1)=1;
  return(0);
}