diff options
Diffstat (limited to 'js/IntegerOp/LOGIC.js')
-rw-r--r-- | js/IntegerOp/LOGIC.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js index 4f2013b8..7a463e3c 100644 --- a/js/IntegerOp/LOGIC.js +++ b/js/IntegerOp/LOGIC.js @@ -15,9 +15,9 @@ function LOGIC() { this.model.blocktype = new ScilabString(["c"]); this.model.firing = new ScilabBoolean([false]); this.model.dep_ut = new ScilabDouble([true,false]); - var exprs = [[sci2exp(this.mat)],[sci2exp(0)]]; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"LOGIC\",sz(1),sz(2));"]); - this.x = standard_define([2,2],this.model,exprs,gr_i); + this.exprs = [[sci2exp(this.mat)],[sci2exp(0)]]; + this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"LOGIC\",sz(1),sz(2));"]); + this.x = standard_define([2,2],this.model,this.exprs,this.gr_i); return new BasicBlock(this.x); } LOGIC.prototype.details = function LOGIC() { @@ -33,12 +33,13 @@ function LOGIC() { LOGIC.prototype.set = function LOGIC() { this.mat = inverse(arguments[0]["mat"]) this.herit = arguments[0]["herit"] + this.exprs = arguments[0]["exprs"] this.x = arg1; this.graphics = arg1.graphics; - var exprs = this.graphics.exprs; + this.exprs = this.graphics.exprs; this.model = arg1.model; while (true) { - [ok,this.mat,this.herit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","LOGIC")],[" "],["Combinatorial logic"],[" "],[" Rows of the matrix are the output values"],[" Number of rows must be a power of two."],[" Number of columns gives the number of outputs."],[" "]],["Truth Table (matrix of outputs)","Accepts Inherited Events (0:No, 1:Yes)"],list("mat",[-1,-2],"vec",1),exprs); + [ok,this.mat,this.herit,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","LOGIC")],[" "],["Combinatorial logic"],[" "],[" Rows of the matrix are the output values"],[" Number of rows must be a power of two."],[" Number of columns gives the number of outputs."],[" "]],["Truth Table (matrix of outputs)","Accepts Inherited Events (0:No, 1:Yes)"],list("mat",[-1,-2],"vec",1),this.exprs); if (!ok) { break; } @@ -66,7 +67,7 @@ function LOGIC() { var ok = tmpvar0[2]; } if (ok) { - this.graphics.exprs = new ScilabDouble([exprs]); + this.graphics.exprs = new ScilabDouble([this.exprs]); this.mat = int8(this.mat); this.model.opar = list(new ScilabDouble([this.mat])); this.x.graphics = this.graphics; |