intex10c.c

Go to the documentation of this file.
00001 #include "stack-c.h"
00002 
00003 /*****************************************
00004  *  Accessing the Scilab Stack 
00005  *     1- Accessing a Scilab Matrix (read and write) 
00006  *        by its name. 
00007  *****************************************/
00008 
00009 int intex10c(fname)
00010      char* fname;
00011 { 
00012   int l1;
00013   static int minlhs=1, minrhs=0, maxlhs=1, maxrhs=0;
00014   static int m, n, lp;
00015   int k;
00016 
00017   CheckRhs(minrhs,maxrhs) ;
00018   CheckLhs(minlhs,maxlhs) ;
00019 
00020   /*
00021    * we want to acces scilab variable : param 
00022    * we can modify or read param with *stk(lp+k)
00023    */ 
00024 
00025   GetMatrixptr("param", &m, &n, &lp);
00026   CreateVar(1, "d",  &m, &n, &l1);
00027 
00028   for (k = 0; k < m*n ; ++k) 
00029     { 
00030       (*stk(l1+k)) = (*stk(lp+k));
00031     }
00032   
00033   LhsVar(1) = 1;
00034   return(0);
00035 }
00036 

Generated on Sun Mar 4 15:03:57 2007 for Scilab [trunk] by  doxygen 1.5.1