summaryrefslogtreecommitdiff
path: root/js/IntegerOp/LOGIC.js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-22 15:17:51 +0530
committerSunil Shetye2018-06-22 16:38:30 +0530
commit870479a2e4b932426a904b2ebae7e4ee72037326 (patch)
tree7e089fd43599783dbddeef0bc7460dd085389b29 /js/IntegerOp/LOGIC.js
parentec185db61d5b6fa65322296e48a983de36436cd0 (diff)
downloadsci2js-870479a2e4b932426a904b2ebae7e4ee72037326.tar.gz
sci2js-870479a2e4b932426a904b2ebae7e4ee72037326.tar.bz2
sci2js-870479a2e4b932426a904b2ebae7e4ee72037326.zip
save global variables in first pass
read those variables in second pass
Diffstat (limited to 'js/IntegerOp/LOGIC.js')
-rw-r--r--js/IntegerOp/LOGIC.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js
index aa41eb6e..06861382 100644
--- a/js/IntegerOp/LOGIC.js
+++ b/js/IntegerOp/LOGIC.js
@@ -11,7 +11,7 @@ model.out2=1;
model.evtin=1;
model.intyp=[5,5];
model.outtyp=5;
-model.opar=list(int8[mat-1]);
+model.opar=list(int8(mat));
model.blocktype="c";
model.firing=false;
model.dep_ut=[true,false];
@@ -34,8 +34,8 @@ if (!ok) {
break;
}
nout=size(mat,2);
-nin=(log[size(mat,1)-1]/log[2-1]);
-u1=floor[nin-1];
+nin=(log(size(mat,1))/log(2));
+u1=floor(nin);
if ((u1!=nin)) {
block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter: %d."),gettext("Truth Table"),size(mat,1)),gettext("Number of rows must be a power of two."));
ok=false;
@@ -55,7 +55,7 @@ ot=5*ones(1,nout);
}
if (ok) {
graphics.exprs=exprs;
-mat=int8[mat-1];
+mat=int8(mat);
model.opar=list(mat);
x.graphics=graphics;
x.model=model;