intex15c.c

Go to the documentation of this file.
00001 #include "stack-c.h"
00002 #include "sciprint.h"
00003 
00004 /*****************************************
00005  *  Accessing the Scilab Stack 
00006  *   Accessing a Scilab String (read) by its name. 
00007  *****************************************/
00008 
00009 #define MAXCH 30
00010 
00011 int intex15c(fname)
00012      char* fname;
00013 { 
00014   static int minlhs=1, minrhs=0, maxlhs=1, maxrhs=0;
00015   char str[MAXCH];
00016   int strl=MAXCH;
00017 
00018   CheckRhs(minrhs,maxrhs) ;
00019   CheckLhs(minlhs,maxlhs) ;
00020 
00021   /* We search a Scilab Object named Mystr check that it is a string 
00022    * and store the string in str. 
00023    * strl is used on entry to give the maximum number 
00024    * of characters which can be stored in str 
00025    * After the call strl contains the number of 
00026    * copied characters
00027    */
00028 
00029   ReadString("Mystr", &strl, str);
00030 
00031   sciprint("Mystr= \"%s\", length %d \r\n", str, strl);
00032 
00033   /*    LhsVar(1) = 0; means "no output"   */
00034   LhsVar(1) = 0;
00035   return(0);
00036 }
00037 

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