/* Save last code interpreted */
int cod_sav = 0;
+ int deleted = 0;
+
/* Loop index */
int k = 0;
}
/* Fill list */
- int deleted = 0;
+
for(k=1;k<=nbstat;k++)
{
newinstr = 0;
// Free memory
freeArrayOfString(str, nCols*nRows);
FREE(int_str);
+ return 0;
}
/****************************************************************
int one = 1;
+ int stkPos = Top;
+ int nbOps = 0;
+
/* Memory allocation */
if((operator=CALLOC(1,sizeof(char*)))==NULL)
{
}
/* In case a EOL is inserted in a row/column catenation */
- int stkPos = Top;
- int nbOps = 0;
if(operator_index2!=24)
{
while (nbOps!=nb_operands && stkPos>0)
int m_mat = 0;
int n_mat = 0;
+ int stkPos = Top;
+ int nbOps = 0;
+
/* Memory allocation */
if((funname=CALLOC(1,sizeof(char*)))==NULL)
{
nbrhs=0;
/* In case a EOL is inserted in a row/column catenation */
- int stkPos = Top;
- int nbOps = 0;
while (nbOps!=nbrhs && stkPos>0)
{
if (*istk(iadr(*Lstk(stkPos))) == 16)
if (codeSave==15)
{
- if (begin>0 & data[cur_ind]!=29) /* Inside a list of inputs or operands */
+ if ((begin>0) & (data[cur_ind]!=29)) /* Inside a list of inputs or operands */
{
count--; /* No new instruction created */
}
int isAComment(int stkPos)
{
- int il = iadr(*Lstk(stkPos));
-
- /* If not a tlist then cannot be a comment */
- if (*istk(il) != 16)
- {
- return 0;
- }
+ int nbElements = 0;
+ int firstElementAdr = 0;
+ int firstChar = 0;
+ int secondChar = 0;
+ int thirdChar = 0;
+ int fourthChar = 0;
+ int il = iadr(*Lstk(stkPos));
+
+ /* If not a tlist then cannot be a comment */
+ if (*istk(il) != 16)
+ {
+ return 0;
+ }
- /* If tlist size not equal to two then cannot be a comment */
- if (*istk(il + 1) != 2)
- {
- return 0;
- }
+ /* If tlist size not equal to two then cannot be a comment */
+ if (*istk(il + 1) != 2)
+ {
+ return 0;
+ }
- /* Now the tlist can be a comment or a cste */
- int nbElements = *istk(il + 1);
- int firstElementAdr = iadr(sadr(il + 3 + nbElements));
- int firstChar = *istk(firstElementAdr + 7);
- int secondChar = *istk(firstElementAdr + 8);
- int thirdChar = *istk(firstElementAdr + 9);
- int fourthChar = *istk(firstElementAdr + 10);
-
- /* 12 = Scilab code for 'c' */
- /* 24 = Scilab code for 'o' */
- /* 22 = Scilab code for 'm' */
- return firstChar==12 && secondChar==24 && thirdChar==22 && fourthChar==22;
+ /* Now the tlist can be a comment or a cste */
+ nbElements = *istk(il + 1);
+ firstElementAdr = iadr(sadr(il + 3 + nbElements));
+ firstChar = *istk(firstElementAdr + 7);
+ secondChar = *istk(firstElementAdr + 8);
+ thirdChar = *istk(firstElementAdr + 9);
+ fourthChar = *istk(firstElementAdr + 10);
+
+ /* 12 = Scilab code for 'c' */
+ /* 24 = Scilab code for 'o' */
+ /* 22 = Scilab code for 'm' */
+ return firstChar==12 && secondChar==24 && thirdChar==22 && fourthChar==22;
}