diff options
Diffstat (limited to 'js')
213 files changed, 1149 insertions, 1149 deletions
diff --git a/js/Branching/CLKFROM.js b/js/Branching/CLKFROM.js index e194738f..32c55b6c 100644 --- a/js/Branching/CLKFROM.js +++ b/js/Branching/CLKFROM.js @@ -22,11 +22,11 @@ function CLKFROM() { return options; } CLKFROM.prototype.set = function CLKFROM() { - this.tag = arguments[0]["tag"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.exprs] = scicos_getvalue("Set block parameters","Tag",list("str",-1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/CLKGOTO.js b/js/Branching/CLKGOTO.js index 555bb858..251a8509 100644 --- a/js/Branching/CLKGOTO.js +++ b/js/Branching/CLKGOTO.js @@ -25,12 +25,12 @@ function CLKGOTO() { return options; } CLKGOTO.prototype.set = function CLKGOTO() { - this.tag = arguments[0]["tag"] - this.tagvis = parseFloat(arguments[0]["tagvis"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.tagvis,this.exprs] = scicos_getvalue("Set block parameters",["Tag","Tag Visibility (1=Local 2=Scoped 3=Global)"],list("str",-1,"vec",1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.tagvis = parseFloat(arguments[0]["tagvis"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/CLKGotoTagVisibility.js b/js/Branching/CLKGotoTagVisibility.js index 7a8bad3d..86532829 100644 --- a/js/Branching/CLKGotoTagVisibility.js +++ b/js/Branching/CLKGotoTagVisibility.js @@ -29,11 +29,11 @@ function CLKGotoTagVisibility() { return options; } CLKGotoTagVisibility.prototype.set = function CLKGotoTagVisibility() { - this.tag = arguments[0]["tag"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/DEMUX.js b/js/Branching/DEMUX.js index accb79b8..7aa4fa5d 100644 --- a/js/Branching/DEMUX.js +++ b/js/Branching/DEMUX.js @@ -25,11 +25,11 @@ function DEMUX() { return options; } DEMUX.prototype.set = function DEMUX() { - this.out = parseFloat(arguments[0]["out"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.out,this.exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("intvec",-1),this.exprs); + var ok = true; + this.out = parseFloat(arguments[0]["out"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/DEMUX_f.js b/js/Branching/DEMUX_f.js index 5eb55bd9..833d6c7d 100644 --- a/js/Branching/DEMUX_f.js +++ b/js/Branching/DEMUX_f.js @@ -25,11 +25,11 @@ function DEMUX_f() { return options; } DEMUX_f.prototype.set = function DEMUX_f() { - this.out = parseFloat(arguments[0]["out"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.out,this.exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("vec",-1),this.exprs); + var ok = true; + this.out = parseFloat(arguments[0]["out"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/ESELECT_f.js b/js/Branching/ESELECT_f.js index 7f84ec33..d21e442e 100644 --- a/js/Branching/ESELECT_f.js +++ b/js/Branching/ESELECT_f.js @@ -31,10 +31,6 @@ function ESELECT_f() { return options; } ESELECT_f.prototype.set = function ESELECT_f() { - this.out = parseFloat(arguments[0]["out"]) - this.inh = parseFloat(arguments[0]["inh"]) - this.nmod = parseFloat(arguments[0]["nmod"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==1) { this.exprs[2-1] = string(1); @@ -43,7 +39,11 @@ function ESELECT_f() { this.exprs[3-1] = string(0); } while (true) { - [ok,this.out,this.inh,this.nmod,this.exprs] = scicos_getvalue("Set ESELECT block parameters",["number of output event ports","Inherit (1: no, 0: yes)","zero-crossing (0: no, 1: yes)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.out = parseFloat(arguments[0]["out"]); + this.inh = parseFloat(arguments[0]["inh"]); + this.nmod = parseFloat(arguments[0]["nmod"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/EXTRACTOR.js b/js/Branching/EXTRACTOR.js index c04a8ed2..a2757def 100644 --- a/js/Branching/EXTRACTOR.js +++ b/js/Branching/EXTRACTOR.js @@ -24,11 +24,11 @@ function EXTRACTOR() { return options; } EXTRACTOR.prototype.set = function EXTRACTOR() { - this.ind = parseFloat(arguments[0]["ind"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.ind,this.exprs] = scicos_getvalue("Set block parameters",["indices to extract"],list("vec",-1),this.exprs); + var ok = true; + this.ind = parseFloat(arguments[0]["ind"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/FROM.js b/js/Branching/FROM.js index 2a798ff9..e2b615e7 100644 --- a/js/Branching/FROM.js +++ b/js/Branching/FROM.js @@ -29,11 +29,11 @@ function FROM() { return options; } FROM.prototype.set = function FROM() { - this.tag = arguments[0]["tag"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/FROMMO.js b/js/Branching/FROMMO.js index 6f28a70c..df3bee93 100644 --- a/js/Branching/FROMMO.js +++ b/js/Branching/FROMMO.js @@ -32,11 +32,11 @@ function FROMMO() { return options; } FROMMO.prototype.set = function FROMMO() { - this.tag = arguments[0]["tag"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/GOTO.js b/js/Branching/GOTO.js index 9816c30f..602cf80e 100644 --- a/js/Branching/GOTO.js +++ b/js/Branching/GOTO.js @@ -30,12 +30,12 @@ function GOTO() { return options; } GOTO.prototype.set = function GOTO() { - this.tag = arguments[0]["tag"] - this.tagvis = parseFloat(arguments[0]["tagvis"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.tagvis,this.exprs] = scicos_getvalue("Set parameters",["Tag","Tag Visibility(1=Local 2=scoped 3= global)"],list("str",-1,"vec",1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.tagvis = parseFloat(arguments[0]["tagvis"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/GOTOMO.js b/js/Branching/GOTOMO.js index 09b3aadd..354764b6 100644 --- a/js/Branching/GOTOMO.js +++ b/js/Branching/GOTOMO.js @@ -33,12 +33,12 @@ function GOTOMO() { return options; } GOTOMO.prototype.set = function GOTOMO() { - this.tag = arguments[0]["tag"] - this.tagvis = parseFloat(arguments[0]["tagvis"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.tagvis,this.exprs] = scicos_getvalue("Set parameters",["Tag","Tag Visibility(1=Local 2=scoped 3= global)"],list("str",-1,"vec",1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.tagvis = parseFloat(arguments[0]["tagvis"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/GotoTagVisibility.js b/js/Branching/GotoTagVisibility.js index 55be12df..e894bf48 100644 --- a/js/Branching/GotoTagVisibility.js +++ b/js/Branching/GotoTagVisibility.js @@ -29,11 +29,11 @@ function GotoTagVisibility() { return options; } GotoTagVisibility.prototype.set = function GotoTagVisibility() { - this.tag = arguments[0]["tag"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/GotoTagVisibilityMO.js b/js/Branching/GotoTagVisibilityMO.js index 1fe14ab0..3caf13d2 100644 --- a/js/Branching/GotoTagVisibilityMO.js +++ b/js/Branching/GotoTagVisibilityMO.js @@ -29,11 +29,11 @@ function GotoTagVisibilityMO() { return options; } GotoTagVisibilityMO.prototype.set = function GotoTagVisibilityMO() { - this.tag = arguments[0]["tag"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tag,this.exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),this.exprs); + var ok = true; + this.tag = arguments[0]["tag"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/ISELECT_f.js b/js/Branching/ISELECT_f.js index 7d356140..8011935f 100644 --- a/js/Branching/ISELECT_f.js +++ b/js/Branching/ISELECT_f.js @@ -28,12 +28,12 @@ function ISELECT_f() { return options; } ISELECT_f.prototype.set = function ISELECT_f() { - this.nout = parseFloat(arguments[0]["nout"]) - this.z0 = parseFloat(arguments[0]["z0"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nout,this.z0,this.exprs] = scicos_getvalue("Set parameters",["number of outputs","initial connected output"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.nout = parseFloat(arguments[0]["nout"]); + this.z0 = parseFloat(arguments[0]["z0"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/ISELECT_m.js b/js/Branching/ISELECT_m.js index 70468296..5506321b 100644 --- a/js/Branching/ISELECT_m.js +++ b/js/Branching/ISELECT_m.js @@ -37,13 +37,13 @@ function ISELECT_m() { return options; } ISELECT_m.prototype.set = function ISELECT_m() { - this.typ = inverse(arguments[0]["typ"]) - this.nout = parseFloat(arguments[0]["nout"]) - this.z0 = parseFloat(arguments[0]["z0"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.typ,this.nout,this.z0,this.exprs] = scicos_getvalue("Set parameters",["Datatype(1= real double 2=Complex 3=int32 ...)","number of outputs","initial connected output"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.nout = parseFloat(arguments[0]["nout"]); + this.z0 = parseFloat(arguments[0]["z0"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js index 4644be89..2c672a94 100644 --- a/js/Branching/MUX.js +++ b/js/Branching/MUX.js @@ -23,11 +23,11 @@ function MUX() { return options; } MUX.prototype.set = function MUX() { - this.in1 = parseFloat(arguments[0]["in1"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.in1,this.exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),this.exprs); + var ok = true; + this.in1 = parseFloat(arguments[0]["in1"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js index 290188d8..0ef2fc8f 100644 --- a/js/Branching/MUX_f.js +++ b/js/Branching/MUX_f.js @@ -23,11 +23,11 @@ function MUX_f() { return options; } MUX_f.prototype.set = function MUX_f() { - this.in1 = parseFloat(arguments[0]["in1"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.in1,this.exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("vec",-1),this.exprs); + var ok = true; + this.in1 = parseFloat(arguments[0]["in1"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/M_SWITCH.js b/js/Branching/M_SWITCH.js index 16dc2c83..c3647993 100644 --- a/js/Branching/M_SWITCH.js +++ b/js/Branching/M_SWITCH.js @@ -28,13 +28,13 @@ function M_SWITCH() { return options; } M_SWITCH.prototype.set = function M_SWITCH() { - this.nin = parseFloat(arguments[0]["nin"]) - this.base = parseFloat(arguments[0]["base"]) - this.rule = arguments[0]["rule"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nin,this.base,this.rule,this.exprs] = scicos_getvalue("Set parameters",["number of inputs","zero base indexing (0), otherwise 1","rounding rule: int (0), round (1), ceil (2), floor (3)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.nin = parseFloat(arguments[0]["nin"]); + this.base = parseFloat(arguments[0]["base"]); + this.rule = arguments[0]["rule"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/NRMSOM_f.js b/js/Branching/NRMSOM_f.js index 2de15638..bdcb77ce 100644 --- a/js/Branching/NRMSOM_f.js +++ b/js/Branching/NRMSOM_f.js @@ -24,11 +24,11 @@ function NRMSOM_f() { return options; } NRMSOM_f.prototype.set = function NRMSOM_f() { - this.nin = parseFloat(arguments[0]["nin"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nin,this.exprs] = scicos_getvalue("Set parameters",["number of inputs"],list("vec",1),this.exprs); + var ok = true; + this.nin = parseFloat(arguments[0]["nin"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/RELAY_f.js b/js/Branching/RELAY_f.js index 579b986f..946caad0 100644 --- a/js/Branching/RELAY_f.js +++ b/js/Branching/RELAY_f.js @@ -29,13 +29,13 @@ function RELAY_f() { return options; } RELAY_f.prototype.set = function RELAY_f() { - this.nin = parseFloat(arguments[0]["nin"]) - this.z0 = arguments[0]["z0"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ipar = this.model.ipar; while (true) { - [ok,this.nin,this.z0,this.exprs] = scicos_getvalue("Set parameters",["number of inputs","initial connected input"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.nin = parseFloat(arguments[0]["nin"]); + this.z0 = arguments[0]["z0"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/SCALAR2VECTOR.js b/js/Branching/SCALAR2VECTOR.js index 8442b522..9cf939c2 100644 --- a/js/Branching/SCALAR2VECTOR.js +++ b/js/Branching/SCALAR2VECTOR.js @@ -23,11 +23,11 @@ function SCALAR2VECTOR() { return options; } SCALAR2VECTOR.prototype.set = function SCALAR2VECTOR() { - this.nout = parseFloat(arguments[0]["nout"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nout,this.exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),this.exprs); + var ok = true; + this.nout = parseFloat(arguments[0]["nout"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/SELECT_f.js b/js/Branching/SELECT_f.js index c425cb24..64722033 100644 --- a/js/Branching/SELECT_f.js +++ b/js/Branching/SELECT_f.js @@ -28,12 +28,12 @@ function SELECT_f() { return options; } SELECT_f.prototype.set = function SELECT_f() { - this.nin = parseFloat(arguments[0]["nin"]) - this.z0 = parseFloat(arguments[0]["z0"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nin,this.z0,this.exprs] = scicos_getvalue("Set parameters",["number of inputs","initial connected input"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.nin = parseFloat(arguments[0]["nin"]); + this.z0 = parseFloat(arguments[0]["z0"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/SELECT_m.js b/js/Branching/SELECT_m.js index b348723c..c0654546 100644 --- a/js/Branching/SELECT_m.js +++ b/js/Branching/SELECT_m.js @@ -37,13 +37,13 @@ function SELECT_m() { return options; } SELECT_m.prototype.set = function SELECT_m() { - this.typ = inverse(arguments[0]["typ"]) - this.nin = parseFloat(arguments[0]["nin"]) - this.z0 = parseFloat(arguments[0]["z0"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.typ,this.nin,this.z0,this.exprs] = scicos_getvalue("Set parameters",["Datatype(1= real double 2=Complex 3=int32 ..)","number of inputs","initial connected input"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.nin = parseFloat(arguments[0]["nin"]); + this.z0 = parseFloat(arguments[0]["z0"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/SWITCH2.js b/js/Branching/SWITCH2.js index a6febbdb..6cf5136f 100644 --- a/js/Branching/SWITCH2.js +++ b/js/Branching/SWITCH2.js @@ -32,13 +32,13 @@ function SWITCH2() { return options; } SWITCH2.prototype.set = function SWITCH2() { - this.rule = parseFloat(arguments[0]["rule"]) - this.thra = arguments[0]["thra"] - this.nzz = parseFloat(arguments[0]["nzz"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.rule,this.thra,this.nzz,this.exprs] = scicos_getvalue("Set parameters",["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.rule = parseFloat(arguments[0]["rule"]); + this.thra = arguments[0]["thra"]; + this.nzz = parseFloat(arguments[0]["nzz"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/SWITCH2_m.js b/js/Branching/SWITCH2_m.js index 4950c22a..22891594 100644 --- a/js/Branching/SWITCH2_m.js +++ b/js/Branching/SWITCH2_m.js @@ -36,14 +36,14 @@ function SWITCH2_m() { return options; } SWITCH2_m.prototype.set = function SWITCH2_m() { - this.ot = arguments[0]["ot"] - this.rule = parseFloat(arguments[0]["rule"]) - this.thra = arguments[0]["thra"] - this.nzz = parseFloat(arguments[0]["nzz"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.ot,this.rule,this.thra,this.nzz,this.exprs] = scicos_getvalue("Set parameters",["Datatype (1=real double 2=complex 3=int32 ...)","pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.ot = arguments[0]["ot"]; + this.rule = parseFloat(arguments[0]["rule"]); + this.thra = arguments[0]["thra"]; + this.nzz = parseFloat(arguments[0]["nzz"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Branching/SWITCH_f.js b/js/Branching/SWITCH_f.js index df143ab9..d1d4e430 100644 --- a/js/Branching/SWITCH_f.js +++ b/js/Branching/SWITCH_f.js @@ -28,13 +28,13 @@ function SWITCH_f() { return options; } SWITCH_f.prototype.set = function SWITCH_f() { - this.nin = parseFloat(arguments[0]["nin"]) - this.z0 = arguments[0]["z0"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ipar = this.model.ipar; while (true) { - [ok,this.nin,this.z0,this.exprs] = scicos_getvalue("Set switch parameters",["number of inputs","connected input"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.nin = parseFloat(arguments[0]["nin"]); + this.z0 = arguments[0]["z0"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js index a890eedf..af4e2829 100644 --- a/js/Electrical/Capacitor.js +++ b/js/Electrical/Capacitor.js @@ -34,12 +34,12 @@ function Capacitor() { return options; } Capacitor.prototype.set = function Capacitor() { - this.C = parseFloat(arguments[0]["C"]) - this.v = parseFloat(arguments[0]["v"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.C,this.v,this.exprs] = scicos_getvalue("Set Capacitor block parameter",["C (F)","Initial Voltage"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.C = parseFloat(arguments[0]["C"]); + this.v = parseFloat(arguments[0]["v"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js index bebb9c4e..d8127ea2 100644 --- a/js/Electrical/ConstantVoltage.js +++ b/js/Electrical/ConstantVoltage.js @@ -31,11 +31,11 @@ function ConstantVoltage() { return options; } ConstantVoltage.prototype.set = function ConstantVoltage() { - this.V = parseFloat(arguments[0]["V"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.V,this.exprs] = scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),this.exprs); + var ok = true; + this.V = parseFloat(arguments[0]["V"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js index b6bdc083..d982f380 100644 --- a/js/Electrical/Diode.js +++ b/js/Electrical/Diode.js @@ -38,14 +38,14 @@ function Diode() { return options; } Diode.prototype.set = function Diode() { - this.Ids = parseFloat(arguments[0]["Ids"]) - this.Vt = parseFloat(arguments[0]["Vt"]) - this.Maxexp = parseFloat(arguments[0]["Maxexp"]) - this.R = parseFloat(arguments[0]["R"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Ids,this.Vt,this.Maxexp,this.R,this.exprs] = scicos_getvalue("Set Diode block parameter",["Saturation cuurent (A)","Voltage equivalent to temperature (Volt)","Max exponent for linear continuation","R (ohm)"],list("vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.Ids = parseFloat(arguments[0]["Ids"]); + this.Vt = parseFloat(arguments[0]["Vt"]); + this.Maxexp = parseFloat(arguments[0]["Maxexp"]); + this.R = parseFloat(arguments[0]["R"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js index fa5879d8..d3f2a192 100644 --- a/js/Electrical/Gyrator.js +++ b/js/Electrical/Gyrator.js @@ -60,13 +60,13 @@ function Gyrator() { return options; } Gyrator.prototype.set = function Gyrator() { - this.G1 = arguments[0]["G1"] - this.G2 = arguments[0]["G2"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; this.exprs = this.x.graphics.exprs; while (true) { - [ok,this.G1,this.G2,this.exprs] = scicos_getvalue([["Set Gyrator block parameters:"],[""],["G1: Gyration conductance"],["G2: Gyration conductance"]],["G1","G2"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.G1 = arguments[0]["G1"]; + this.G2 = arguments[0]["G2"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js index 2d7284b9..9444a558 100644 --- a/js/Electrical/IdealTransformer.js +++ b/js/Electrical/IdealTransformer.js @@ -59,12 +59,12 @@ function IdealTransformer() { return options; } IdealTransformer.prototype.set = function IdealTransformer() { - this.N = arguments[0]["N"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; this.exprs = this.x.graphics.exprs; while (true) { - [ok,this.N,this.exprs] = scicos_getvalue([["Set Transformer block parameters:"],[""],["N:"+" Turn ratio (N1/N2)"]],["N"],list("vec",1),this.exprs); + var ok = true; + this.N = arguments[0]["N"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js index e2efde59..0e4824fc 100644 --- a/js/Electrical/Inductor.js +++ b/js/Electrical/Inductor.js @@ -31,11 +31,11 @@ function Inductor() { return options; } Inductor.prototype.set = function Inductor() { - this.L = parseFloat(arguments[0]["L"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.L,this.exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),this.exprs); + var ok = true; + this.L = parseFloat(arguments[0]["L"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js index 9976ae99..38700e9a 100644 --- a/js/Electrical/NMOS.js +++ b/js/Electrical/NMOS.js @@ -47,19 +47,19 @@ function NMOS() { return options; } NMOS.prototype.set = function NMOS() { - this.W = parseFloat(arguments[0]["W"]) - this.L = parseFloat(arguments[0]["L"]) - this.Beta = parseFloat(arguments[0]["Beta"]) - this.Vt = parseFloat(arguments[0]["Vt"]) - this.K2 = parseFloat(arguments[0]["K2"]) - this.K5 = parseFloat(arguments[0]["K5"]) - this.dW = parseFloat(arguments[0]["dW"]) - this.dL = parseFloat(arguments[0]["dL"]) - this.RDS = parseFloat(arguments[0]["RDS"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,this.exprs] = scicos_getvalue("Set NMOS Transistor block parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.W = parseFloat(arguments[0]["W"]); + this.L = parseFloat(arguments[0]["L"]); + this.Beta = parseFloat(arguments[0]["Beta"]); + this.Vt = parseFloat(arguments[0]["Vt"]); + this.K2 = parseFloat(arguments[0]["K2"]); + this.K5 = parseFloat(arguments[0]["K5"]); + this.dW = parseFloat(arguments[0]["dW"]); + this.dL = parseFloat(arguments[0]["dL"]); + this.RDS = parseFloat(arguments[0]["RDS"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js index 665dbda0..8a69f831 100644 --- a/js/Electrical/NPN.js +++ b/js/Electrical/NPN.js @@ -75,28 +75,28 @@ function NPN() { return options; } NPN.prototype.set = function NPN() { - this.Bf = arguments[0]["Bf"] - this.Br = arguments[0]["Br"] - this.Is = arguments[0]["Is"] - this.Vak = arguments[0]["Vak"] - this.Tauf = arguments[0]["Tauf"] - this.Taur = arguments[0]["Taur"] - this.Ccs = arguments[0]["Ccs"] - this.Cje = arguments[0]["Cje"] - this.Cjc = arguments[0]["Cjc"] - this.Phie = arguments[0]["Phie"] - this.Me = arguments[0]["Me"] - this.Phic = arguments[0]["Phic"] - this.Mc = arguments[0]["Mc"] - this.Gbc = arguments[0]["Gbc"] - this.Gbe = arguments[0]["Gbe"] - this.Vt = arguments[0]["Vt"] - this.EMinMax = arguments[0]["EMinMax"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; this.exprs = this.x.graphics.exprs; while (true) { - [ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax,this.exprs] = scicos_getvalue([["Set NPN block parameters:"],[""]],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinmax: if x > EMinMax, the exp(x) is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.Bf = arguments[0]["Bf"]; + this.Br = arguments[0]["Br"]; + this.Is = arguments[0]["Is"]; + this.Vak = arguments[0]["Vak"]; + this.Tauf = arguments[0]["Tauf"]; + this.Taur = arguments[0]["Taur"]; + this.Ccs = arguments[0]["Ccs"]; + this.Cje = arguments[0]["Cje"]; + this.Cjc = arguments[0]["Cjc"]; + this.Phie = arguments[0]["Phie"]; + this.Me = arguments[0]["Me"]; + this.Phic = arguments[0]["Phic"]; + this.Mc = arguments[0]["Mc"]; + this.Gbc = arguments[0]["Gbc"]; + this.Gbe = arguments[0]["Gbe"]; + this.Vt = arguments[0]["Vt"]; + this.EMinMax = arguments[0]["EMinMax"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js index 469ab014..ac58c8d0 100644 --- a/js/Electrical/OpAmp.js +++ b/js/Electrical/OpAmp.js @@ -35,13 +35,13 @@ function OpAmp() { return options; } OpAmp.prototype.set = function OpAmp() { - this.OLGain = arguments[0]["OLGain"] - this.SatH = arguments[0]["SatH"] - this.SatL = arguments[0]["SatL"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (false) { - [ok,this.OLGain,this.SatH,this.SatL,this.exprs] = scicos_getvalue("Set the Operational Amplifier parameters",["Open Loop Gain","Positive saturation voltage","Negative saturation voltage"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.OLGain = arguments[0]["OLGain"]; + this.SatH = arguments[0]["SatH"]; + this.SatL = arguments[0]["SatL"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js index f031f236..bd88da1a 100644 --- a/js/Electrical/PMOS.js +++ b/js/Electrical/PMOS.js @@ -47,19 +47,19 @@ function PMOS() { return options; } PMOS.prototype.set = function PMOS() { - this.W = parseFloat(arguments[0]["W"]) - this.L = parseFloat(arguments[0]["L"]) - this.Beta = parseFloat(arguments[0]["Beta"]) - this.Vt = parseFloat(arguments[0]["Vt"]) - this.K2 = parseFloat(arguments[0]["K2"]) - this.K5 = parseFloat(arguments[0]["K5"]) - this.dW = parseFloat(arguments[0]["dW"]) - this.dL = parseFloat(arguments[0]["dL"]) - this.RDS = parseFloat(arguments[0]["RDS"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,this.exprs] = scicos_getvalue("Set PMOS Transistor parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.W = parseFloat(arguments[0]["W"]); + this.L = parseFloat(arguments[0]["L"]); + this.Beta = parseFloat(arguments[0]["Beta"]); + this.Vt = parseFloat(arguments[0]["Vt"]); + this.K2 = parseFloat(arguments[0]["K2"]); + this.K5 = parseFloat(arguments[0]["K5"]); + this.dW = parseFloat(arguments[0]["dW"]); + this.dL = parseFloat(arguments[0]["dL"]); + this.RDS = parseFloat(arguments[0]["RDS"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js index ef2e280b..d745ab00 100644 --- a/js/Electrical/PNP.js +++ b/js/Electrical/PNP.js @@ -75,28 +75,28 @@ function PNP() { return options; } PNP.prototype.set = function PNP() { - this.Bf = arguments[0]["Bf"] - this.Br = arguments[0]["Br"] - this.Is = arguments[0]["Is"] - this.Vak = arguments[0]["Vak"] - this.Tauf = arguments[0]["Tauf"] - this.Taur = arguments[0]["Taur"] - this.Ccs = arguments[0]["Ccs"] - this.Cje = arguments[0]["Cje"] - this.Cjc = arguments[0]["Cjc"] - this.Phie = arguments[0]["Phie"] - this.Me = arguments[0]["Me"] - this.Phic = arguments[0]["Phic"] - this.Mc = arguments[0]["Mc"] - this.Gbc = arguments[0]["Gbc"] - this.Gbe = arguments[0]["Gbe"] - this.Vt = arguments[0]["Vt"] - this.EMinMax = arguments[0]["EMinMax"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; this.exprs = this.x.graphics.exprs; while (true) { - [ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax,this.exprs] = scicos_getvalue([["Set PNP block parameters:"],[""]],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinMax: if x > EMinMax, the exp(x) function is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.Bf = arguments[0]["Bf"]; + this.Br = arguments[0]["Br"]; + this.Is = arguments[0]["Is"]; + this.Vak = arguments[0]["Vak"]; + this.Tauf = arguments[0]["Tauf"]; + this.Taur = arguments[0]["Taur"]; + this.Ccs = arguments[0]["Ccs"]; + this.Cje = arguments[0]["Cje"]; + this.Cjc = arguments[0]["Cjc"]; + this.Phie = arguments[0]["Phie"]; + this.Me = arguments[0]["Me"]; + this.Phic = arguments[0]["Phic"]; + this.Mc = arguments[0]["Mc"]; + this.Gbc = arguments[0]["Gbc"]; + this.Gbe = arguments[0]["Gbe"]; + this.Vt = arguments[0]["Vt"]; + this.EMinMax = arguments[0]["EMinMax"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js index 383e2735..9b62ccee 100644 --- a/js/Electrical/Resistor.js +++ b/js/Electrical/Resistor.js @@ -31,11 +31,11 @@ function Resistor() { return options; } Resistor.prototype.set = function Resistor() { - this.R = parseFloat(arguments[0]["R"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.R,this.exprs] = scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),this.exprs); + var ok = true; + this.R = parseFloat(arguments[0]["R"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js index f4c18f51..b5b287aa 100644 --- a/js/Electrical/SineVoltage.js +++ b/js/Electrical/SineVoltage.js @@ -40,15 +40,15 @@ function SineVoltage() { return options; } SineVoltage.prototype.set = function SineVoltage() { - this.V = parseFloat(arguments[0]["V"]) - this.ph = parseFloat(arguments[0]["ph"]) - this.frq = parseFloat(arguments[0]["frq"]) - this.offset = parseFloat(arguments[0]["offset"]) - this.start = parseFloat(arguments[0]["start"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.V,this.ph,this.frq,this.offset,this.start,this.exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","phase (rad)","Frequency (Hz)","Voltageoffset (V)","Timeoffset (s)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.V = parseFloat(arguments[0]["V"]); + this.ph = parseFloat(arguments[0]["ph"]); + this.frq = parseFloat(arguments[0]["frq"]); + this.offset = parseFloat(arguments[0]["offset"]); + this.start = parseFloat(arguments[0]["start"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js index 35407ac3..d55c62cd 100644 --- a/js/Electrical/Switch.js +++ b/js/Electrical/Switch.js @@ -36,12 +36,12 @@ function Switch() { return options; } Switch.prototype.set = function Switch() { - this.Ron = parseFloat(arguments[0]["Ron"]) - this.Roff = parseFloat(arguments[0]["Roff"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Ron,this.Roff,this.exprs] = scicos_getvalue("Set non-ideal electrical switch parameters",["Resistance in On state (Ohm)","Resistance in Off state (Ohm)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.Ron = parseFloat(arguments[0]["Ron"]); + this.Roff = parseFloat(arguments[0]["Roff"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js index 49e9325c..b09eb9a8 100644 --- a/js/Electrical/VVsourceAC.js +++ b/js/Electrical/VVsourceAC.js @@ -33,11 +33,11 @@ function VVsourceAC() { return options; } VVsourceAC.prototype.set = function VVsourceAC() { - this.FR = parseFloat(arguments[0]["FR"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.FR,this.exprs] = scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),this.exprs); + var ok = true; + this.FR = parseFloat(arguments[0]["FR"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js index 549b2b5e..69149d14 100644 --- a/js/Electrical/VsourceAC.js +++ b/js/Electrical/VsourceAC.js @@ -34,12 +34,12 @@ function VsourceAC() { return options; } VsourceAC.prototype.set = function VsourceAC() { - this.VA = parseFloat(arguments[0]["VA"]) - this.FR = parseFloat(arguments[0]["FR"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.VA,this.FR,this.exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","Frequency (Hz)"],list("vec",-1,"vec",-1),this.exprs); + var ok = true; + this.VA = parseFloat(arguments[0]["VA"]); + this.FR = parseFloat(arguments[0]["FR"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/END_c.js b/js/Events/END_c.js index d1c5817a..f3817eb5 100644 --- a/js/Events/END_c.js +++ b/js/Events/END_c.js @@ -24,11 +24,11 @@ function END_c() { return options; } END_c.prototype.set = function END_c() { - this.tf = parseFloat(arguments[0]["tf"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tf,this.exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),this.exprs); + var ok = true; + this.tf = parseFloat(arguments[0]["tf"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/EVTDLY_c.js b/js/Events/EVTDLY_c.js index 0abb9bca..4b223c5f 100644 --- a/js/Events/EVTDLY_c.js +++ b/js/Events/EVTDLY_c.js @@ -27,12 +27,12 @@ function EVTDLY_c() { return options; } EVTDLY_c.prototype.set = function EVTDLY_c() { - this.dt = parseFloat(arguments[0]["dt"]) - this.ff = parseFloat(arguments[0]["ff"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.dt,this.ff,this.exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" to disable any output event."]],["Delay","Date of initial output event"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.dt = parseFloat(arguments[0]["dt"]); + this.ff = parseFloat(arguments[0]["ff"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/EVTDLY_f.js b/js/Events/EVTDLY_f.js index cd9c607b..66c3ab5d 100644 --- a/js/Events/EVTDLY_f.js +++ b/js/Events/EVTDLY_f.js @@ -27,12 +27,12 @@ function EVTDLY_f() { return options; } EVTDLY_f.prototype.set = function EVTDLY_f() { - this.dt = parseFloat(arguments[0]["dt"]) - this.ff = parseFloat(arguments[0]["ff"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.dt,this.ff,this.exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],["Delay","Date of initial output event"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.dt = parseFloat(arguments[0]["dt"]); + this.ff = parseFloat(arguments[0]["ff"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/EVTGEN_f.js b/js/Events/EVTGEN_f.js index 5c835346..3d99d71c 100644 --- a/js/Events/EVTGEN_f.js +++ b/js/Events/EVTGEN_f.js @@ -23,11 +23,11 @@ function EVTGEN_f() { return options; } EVTGEN_f.prototype.set = function EVTGEN_f() { - this.tt = parseFloat(arguments[0]["tt"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.tt,this.exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),this.exprs); + var ok = true; + this.tt = parseFloat(arguments[0]["tt"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/EVTVARDLY.js b/js/Events/EVTVARDLY.js index 4732544f..61fbac44 100644 --- a/js/Events/EVTVARDLY.js +++ b/js/Events/EVTVARDLY.js @@ -24,11 +24,11 @@ function EVTVARDLY() { return options; } EVTVARDLY.prototype.set = function EVTVARDLY() { - this.fir = arguments[0]["fir"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.fir,this.exprs] = scicos_getvalue("Set parameter of variable event delay","Initial event firing time (<0 if absent)",list("vec",1),this.exprs); + var ok = true; + this.fir = arguments[0]["fir"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/HALT_f.js b/js/Events/HALT_f.js index e0ab69c9..a93fb2c0 100644 --- a/js/Events/HALT_f.js +++ b/js/Events/HALT_f.js @@ -24,11 +24,11 @@ function HALT_f() { return options; } HALT_f.prototype.set = function HALT_f() { - this.n = parseFloat(arguments[0]["n"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.n,this.exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),this.exprs); + var ok = true; + this.n = parseFloat(arguments[0]["n"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/IFTHEL_f.js b/js/Events/IFTHEL_f.js index 9a805282..ddfb8237 100644 --- a/js/Events/IFTHEL_f.js +++ b/js/Events/IFTHEL_f.js @@ -29,9 +29,6 @@ function IFTHEL_f() { return options; } IFTHEL_f.prototype.set = function IFTHEL_f() { - this.inh = inverse(arguments[0]["inh"]) - this.nmod = parseFloat(arguments[0]["nmod"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; if (this.exprs==[]) { this.exprs = string(1); @@ -40,7 +37,10 @@ function IFTHEL_f() { this.exprs[2-1] = string(1); } while (true) { - [ok,this.inh,this.nmod,this.exprs] = scicos_getvalue("Set parameters",["Inherit (1: no, 0: yes)","zero-crossing (0: no, 1: yes)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.inh = inverse(arguments[0]["inh"]); + this.nmod = parseFloat(arguments[0]["nmod"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/MFCLCK_f.js b/js/Events/MFCLCK_f.js index 72992ea3..1edf1edd 100644 --- a/js/Events/MFCLCK_f.js +++ b/js/Events/MFCLCK_f.js @@ -29,11 +29,11 @@ function MFCLCK_f() { return options; } MFCLCK_f.prototype.set = function MFCLCK_f() { - this.dt = parseFloat(arguments[0]["dt"]) - this.nn = parseFloat(arguments[0]["nn"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; - [ok,this.dt,this.nn,this.exprs] = scicos_getvalue("Set Multifrequency clock parameters",["basic period (1/f)","multiply by (n)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.dt = parseFloat(arguments[0]["dt"]); + this.nn = parseFloat(arguments[0]["nn"]); + this.exprs = arguments[0]["exprs"]; if (ok) { this.model.ipar = new ScilabDouble([this.nn]); this.model.rpar = new ScilabDouble([this.dt]); diff --git a/js/Events/M_freq.js b/js/Events/M_freq.js index 1b3ee90b..78e07f61 100644 --- a/js/Events/M_freq.js +++ b/js/Events/M_freq.js @@ -26,12 +26,12 @@ function M_freq() { return options; } M_freq.prototype.set = function M_freq() { - this.frequ = inverse(arguments[0]["frequ"]) - this.offset = inverse(arguments[0]["offset"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.frequ,this.offset,this.exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",-1,"vec",-1),this.exprs); + var ok = true; + this.frequ = inverse(arguments[0]["frequ"]); + this.offset = inverse(arguments[0]["offset"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Events/freq_div.js b/js/Events/freq_div.js index faa29011..565a8e6b 100644 --- a/js/Events/freq_div.js +++ b/js/Events/freq_div.js @@ -118,9 +118,6 @@ function freq_div() { return options; } freq_div.prototype.set = function freq_div() { - %ph = parseFloat(arguments[0]["%ph"]) - %df = parseFloat(arguments[0]["%df"]) - this.exprs = inverse(arguments[0]["exprs"]) if (typeof(o)=="Block"&&o.gui=="Modulo_Count") { var path = i; break; @@ -138,7 +135,10 @@ function freq_div() { this.exprs = this.graphics.exprs; this.model = xx.model; while (true) { - [ok,%ph,%df,this.exprs] = scicos_getvalue("Set frequency division block parameters",["Phase (0 to division factor -1)","Division factor"],list("vec",1,"vec",1),this.exprs); + var ok = true; + %ph = parseFloat(arguments[0]["%ph"]); + %df = parseFloat(arguments[0]["%df"]); + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Hydraulics/Bache.js b/js/Hydraulics/Bache.js index ffef23e2..e81cb615 100644 --- a/js/Hydraulics/Bache.js +++ b/js/Hydraulics/Bache.js @@ -52,19 +52,19 @@ function Bache() { return options; } Bache.prototype.set = function Bache() { - this.Patm = parseFloat(arguments[0]["Patm"]) - this.A = parseFloat(arguments[0]["A"]) - this.ze1 = parseFloat(arguments[0]["ze1"]) - this.ze2 = parseFloat(arguments[0]["ze2"]) - this.zs1 = parseFloat(arguments[0]["zs1"]) - this.zs2 = parseFloat(arguments[0]["zs2"]) - this.z0 = parseFloat(arguments[0]["z0"]) - this.T0 = parseFloat(arguments[0]["T0"]) - this.p_rho = parseFloat(arguments[0]["p_rho"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Patm,this.A,this.ze1,this.ze2,this.zs1,this.zs2,this.z0,this.T0,this.p_rho,this.exprs] = scicos_getvalue("Parametres de la bache",["Pression dans le ciel de la bache : Patm (Pa)","Section de la bache : A (m2)","Altitude du piquage d entrée 1: ze1 (m)","Altitude du piquage d entrée 2: ze2 (m)","Altitude du piquage de sortie 1: zs1 (m)","Altitude du piquage de sortie 2: zs2 (m)","Altitude initiale du fluide : z0 (m)","Température initiale du fluide : T0 (K)","Si >0, masse volumique imposée du fluide : p_rho (kg/m3)"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.Patm = parseFloat(arguments[0]["Patm"]); + this.A = parseFloat(arguments[0]["A"]); + this.ze1 = parseFloat(arguments[0]["ze1"]); + this.ze2 = parseFloat(arguments[0]["ze2"]); + this.zs1 = parseFloat(arguments[0]["zs1"]); + this.zs2 = parseFloat(arguments[0]["zs2"]); + this.z0 = parseFloat(arguments[0]["z0"]); + this.T0 = parseFloat(arguments[0]["T0"]); + this.p_rho = parseFloat(arguments[0]["p_rho"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Hydraulics/Flowmeter.js b/js/Hydraulics/Flowmeter.js index b4af13cd..9120e1af 100644 --- a/js/Hydraulics/Flowmeter.js +++ b/js/Hydraulics/Flowmeter.js @@ -58,12 +58,12 @@ function Flowmeter() { return options; } Flowmeter.prototype.set = function Flowmeter() { - this.Qini = arguments[0]["Qini"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; this.exprs = this.x.graphics.exprs; while (false) { - [ok,this.Qini,this.exprs] = scicos_getvalue([["Set Flowmeter block parameters:"],[""],["Qini: "]],"Qini",list("vec",1),this.exprs); + var ok = true; + this.Qini = arguments[0]["Qini"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Hydraulics/PerteDP.js b/js/Hydraulics/PerteDP.js index 7bb2c434..0146d1a4 100644 --- a/js/Hydraulics/PerteDP.js +++ b/js/Hydraulics/PerteDP.js @@ -44,16 +44,16 @@ function PerteDP() { return options; } PerteDP.prototype.set = function PerteDP() { - this.L = parseFloat(arguments[0]["L"]) - this.D = parseFloat(arguments[0]["D"]) - this.lambda = parseFloat(arguments[0]["lambda"]) - this.z1 = parseFloat(arguments[0]["z1"]) - this.z2 = parseFloat(arguments[0]["z2"]) - this.p_rho = parseFloat(arguments[0]["p_rho"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.L,this.D,this.lambda,this.z1,this.z2,this.p_rho,this.exprs] = scicos_getvalue("Parametres du tuyau",["Longueur du tube : L (m)","Diamètre interne du tube : D (m)","Coefficient de perte de charge-frottement(S.U) : lambda","Altitude entrée tuyauterie : z1 (m)","Altitude sortie tuyauterie : z2 (m)","Si >0, masse volumique imposée fu fluide : p_rho (kg/m3)"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.L = parseFloat(arguments[0]["L"]); + this.D = parseFloat(arguments[0]["D"]); + this.lambda = parseFloat(arguments[0]["lambda"]); + this.z1 = parseFloat(arguments[0]["z1"]); + this.z2 = parseFloat(arguments[0]["z2"]); + this.p_rho = parseFloat(arguments[0]["p_rho"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Hydraulics/PuitsP.js b/js/Hydraulics/PuitsP.js index e9043c22..eeb6dd69 100644 --- a/js/Hydraulics/PuitsP.js +++ b/js/Hydraulics/PuitsP.js @@ -35,14 +35,14 @@ function PuitsP() { return options; } PuitsP.prototype.set = function PuitsP() { - this.P0 = parseFloat(arguments[0]["P0"]) - this.T0 = parseFloat(arguments[0]["T0"]) - this.H0 = parseFloat(arguments[0]["H0"]) - this.option_temperature = parseFloat(arguments[0]["option_temperature"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.P0,this.T0,this.H0,this.option_temperature,this.exprs] = scicos_getvalue("Paramètres du puits",["Pression de la source : P0 (Pa)","Temperature de la source : T0 (K)","Enthalpie spécifique de la source : H0 (J/kg)","1:température fixée - 2:enthalpie fixée : option_temperature"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.P0 = parseFloat(arguments[0]["P0"]); + this.T0 = parseFloat(arguments[0]["T0"]); + this.H0 = parseFloat(arguments[0]["H0"]); + this.option_temperature = parseFloat(arguments[0]["option_temperature"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Hydraulics/SourceP.js b/js/Hydraulics/SourceP.js index 7d36cfba..570f1cdb 100644 --- a/js/Hydraulics/SourceP.js +++ b/js/Hydraulics/SourceP.js @@ -37,14 +37,14 @@ function SourceP() { return options; } SourceP.prototype.set = function SourceP() { - this.P0 = parseFloat(arguments[0]["P0"]) - this.T0 = parseFloat(arguments[0]["T0"]) - this.H0 = parseFloat(arguments[0]["H0"]) - this.option_temperature = parseFloat(arguments[0]["option_temperature"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.P0,this.T0,this.H0,this.option_temperature,this.exprs] = scicos_getvalue("Paramètres du puits",["Pression de la source : P0 (Pa)","Temperature de la source : T0 (K)","Enthalpie spécifique de la source : H0 (J/kg)","1:température fixée - 2:enthalpie fixée : option_temperature"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.P0 = parseFloat(arguments[0]["P0"]); + this.T0 = parseFloat(arguments[0]["T0"]); + this.H0 = parseFloat(arguments[0]["H0"]); + this.option_temperature = parseFloat(arguments[0]["option_temperature"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Hydraulics/VanneReglante.js b/js/Hydraulics/VanneReglante.js index 7d5dd695..002be365 100644 --- a/js/Hydraulics/VanneReglante.js +++ b/js/Hydraulics/VanneReglante.js @@ -36,12 +36,12 @@ function VanneReglante() { return options; } VanneReglante.prototype.set = function VanneReglante() { - this.Cvmax = parseFloat(arguments[0]["Cvmax"]) - this.p_rho = parseFloat(arguments[0]["p_rho"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Cvmax,this.p_rho,this.exprs] = scicos_getvalue("Paramètres de la vanne reglante",["Cvmax","p_rho"],list("vec",-1,"vec",-1),this.exprs); + var ok = true; + this.Cvmax = parseFloat(arguments[0]["Cvmax"]); + this.p_rho = parseFloat(arguments[0]["p_rho"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/IntegerOp/BITCLEAR.js b/js/IntegerOp/BITCLEAR.js index 812312a1..b8d7ef79 100644 --- a/js/IntegerOp/BITCLEAR.js +++ b/js/IntegerOp/BITCLEAR.js @@ -28,12 +28,12 @@ function BITCLEAR() { return options; } BITCLEAR.prototype.set = function BITCLEAR() { - this.Datatype = arguments[0]["Datatype"] - this.bit = parseFloat(arguments[0]["bit"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Datatype,this.bit,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITCLEAR")],[" "],["Clear a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.Datatype = arguments[0]["Datatype"]; + this.bit = parseFloat(arguments[0]["bit"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/IntegerOp/BITSET.js b/js/IntegerOp/BITSET.js index 035218c4..785af65c 100644 --- a/js/IntegerOp/BITSET.js +++ b/js/IntegerOp/BITSET.js @@ -28,12 +28,12 @@ function BITSET() { return options; } BITSET.prototype.set = function BITSET() { - this.Datatype = arguments[0]["Datatype"] - this.bit = parseFloat(arguments[0]["bit"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Datatype,this.bit,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITSET")],[" "],["Set a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.Datatype = arguments[0]["Datatype"]; + this.bit = parseFloat(arguments[0]["bit"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/IntegerOp/CONVERT.js b/js/IntegerOp/CONVERT.js index 1eac1fae..ced2b9c3 100644 --- a/js/IntegerOp/CONVERT.js +++ b/js/IntegerOp/CONVERT.js @@ -31,13 +31,13 @@ function CONVERT() { return options; } CONVERT.prototype.set = function CONVERT() { - this.it = parseFloat(arguments[0]["it"]) - this.ot = parseFloat(arguments[0]["ot"]) - this.np = arguments[0]["np"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.it,this.ot,this.np,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONVERT")],[" "],["Type conversion"],[" "]],["Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.it = parseFloat(arguments[0]["it"]); + this.ot = parseFloat(arguments[0]["ot"]); + this.np = arguments[0]["np"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/IntegerOp/EXTRACTBITS.js b/js/IntegerOp/EXTRACTBITS.js index 66c5dbfb..39e19a6f 100644 --- a/js/IntegerOp/EXTRACTBITS.js +++ b/js/IntegerOp/EXTRACTBITS.js @@ -31,14 +31,14 @@ function EXTRACTBITS() { return options; } EXTRACTBITS.prototype.set = function EXTRACTBITS() { - this.Datatype = arguments[0]["Datatype"] - this.rule = parseFloat(arguments[0]["rule"]) - this.bit = parseFloat(arguments[0]["bit"]) - this.scal = arguments[0]["scal"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Datatype,this.rule,this.bit,this.scal,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","EXTRACTBITS")],[" "],["Bits Extraction"],[" "],[" - Bits to Extract:"],[" 1 Upper Half"],[" 2 Lower Half"],[" 3 Range from MSB"],[" 4 Range to LSB"],[" 5 Range of Bits"],[" - Number of Bits or Index of bit : Index 0 is LSB"],[" If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Bits to extract","Number of Bits or Index of Bit","Treat Bit Field as an Integer (0:No, 1:Yes)"],list("vec",1,"vec",1,"vec",-1,"vec",1),this.exprs); + var ok = true; + this.Datatype = arguments[0]["Datatype"]; + this.rule = parseFloat(arguments[0]["rule"]); + this.bit = parseFloat(arguments[0]["bit"]); + this.scal = arguments[0]["scal"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/IntegerOp/INTMUL.js b/js/IntegerOp/INTMUL.js index e0670d92..5bdb6a8e 100644 --- a/js/IntegerOp/INTMUL.js +++ b/js/IntegerOp/INTMUL.js @@ -30,12 +30,12 @@ function INTMUL() { return options; } INTMUL.prototype.set = function INTMUL() { - this.Datatype = arguments[0]["Datatype"] - this.np = arguments[0]["np"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Datatype,this.np,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INTMUL")],[" "],["Integer matrix multiplication"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.Datatype = arguments[0]["Datatype"]; + this.np = arguments[0]["np"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js index fefbe032..026a75ab 100644 --- a/js/IntegerOp/JKFLIPFLOP.js +++ b/js/IntegerOp/JKFLIPFLOP.js @@ -57,8 +57,6 @@ function JKFLIPFLOP() { return options; } JKFLIPFLOP.prototype.set = function JKFLIPFLOP() { - this.init = parseFloat(arguments[0]["init"]) - this.exprs0 = arguments[0]["exprs0"] if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") { var path = i; break; @@ -69,7 +67,9 @@ function JKFLIPFLOP() { this.model = xx.model; var init_old = this.model.odstate[1-1]; while (true) { - [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","JKFLIPFLOP")],[" "],["JK flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],[" - Negative values are considered as int8(0)"],[" - Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),this.exprs); + var ok = true; + this.init = parseFloat(arguments[0]["init"]); + this.exprs0 = arguments[0]["exprs0"]; if (!ok) { break; } diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js index ce05e1ab..06eb2c10 100644 --- a/js/IntegerOp/LOGIC.js +++ b/js/IntegerOp/LOGIC.js @@ -31,12 +31,12 @@ function LOGIC() { return options; } LOGIC.prototype.set = function LOGIC() { - this.mat = inverse(arguments[0]["mat"]) - this.herit = arguments[0]["herit"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [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); + var ok = true; + this.mat = inverse(arguments[0]["mat"]); + this.herit = arguments[0]["herit"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/IntegerOp/SHIFT.js b/js/IntegerOp/SHIFT.js index bb7c16b6..c7d434a7 100644 --- a/js/IntegerOp/SHIFT.js +++ b/js/IntegerOp/SHIFT.js @@ -32,13 +32,13 @@ function SHIFT() { return options; } SHIFT.prototype.set = function SHIFT() { - this.Datatype = arguments[0]["Datatype"] - this.nb = arguments[0]["nb"] - this.np = arguments[0]["np"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.Datatype,this.nb,this.np,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","SHIFT")],[" "],["Shift/Rotates bits"]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Number of Bits to Shift Left (Negative number to shift right)","Shift Type (0:Arithmetic, 1:Circular)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.Datatype = arguments[0]["Datatype"]; + this.nb = arguments[0]["nb"]; + this.np = arguments[0]["np"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js index c0256cd3..055c87b7 100644 --- a/js/IntegerOp/SRFLIPFLOP.js +++ b/js/IntegerOp/SRFLIPFLOP.js @@ -41,8 +41,6 @@ function SRFLIPFLOP() { return options; } SRFLIPFLOP.prototype.set = function SRFLIPFLOP() { - this.init = parseFloat(arguments[0]["init"]) - this.exprs0 = arguments[0]["exprs0"] if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") { var path = i; break; @@ -53,7 +51,9 @@ function SRFLIPFLOP() { this.model = xx.model; var init_old = this.model.odstate[1-1]; while (true) { - [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","SRFLIPFLOP")],[" "],["SR flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],[" - Negative values are considered as int8(0)"],[" - Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),this.exprs); + var ok = true; + this.init = parseFloat(arguments[0]["init"]); + this.exprs0 = arguments[0]["exprs0"]; if (!ok) { break; } diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js index 7eab70db..eddff7f0 100644 --- a/js/Linear/BIGSOM_f.js +++ b/js/Linear/BIGSOM_f.js @@ -23,11 +23,11 @@ function BIGSOM_f() { return options; } BIGSOM_f.prototype.set = function BIGSOM_f() { - this.sgn = inverse(arguments[0]["sgn"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.sgn,this.exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),this.exprs); + var ok = true; + this.sgn = inverse(arguments[0]["sgn"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/CLR.js b/js/Linear/CLR.js index 96bce872..498db2d9 100644 --- a/js/Linear/CLR.js +++ b/js/Linear/CLR.js @@ -30,9 +30,6 @@ function CLR() { return options; } CLR.prototype.set = function CLR() { - this.num = arguments[0]["num"] - this.den = arguments[0]["den"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var x0 = this.model.state; var rpar = this.model.rpar; @@ -42,7 +39,10 @@ function CLR() { var PREVAR_scicos_context = PREVAR_scicos_context; PREVAR_scicos_context.s = %s; while (true) { - [ok,this.num,this.den,this.exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),this.exprs); + var ok = true; + this.num = arguments[0]["num"]; + this.den = arguments[0]["den"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/CLR_f.js b/js/Linear/CLR_f.js index c6a4f351..c97910fd 100644 --- a/js/Linear/CLR_f.js +++ b/js/Linear/CLR_f.js @@ -30,9 +30,6 @@ function CLR_f() { return options; } CLR_f.prototype.set = function CLR_f() { - this.num = arguments[0]["num"] - this.den = arguments[0]["den"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var x0 = this.model.state; var rpar = this.model.rpar; @@ -42,7 +39,10 @@ function CLR_f() { var PREVAR_scicos_context = PREVAR_scicos_context; PREVAR_scicos_context.s = %s; while (true) { - [ok,this.num,this.den,this.exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),this.exprs); + var ok = true; + this.num = arguments[0]["num"]; + this.den = arguments[0]["den"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/CLSS.js b/js/Linear/CLSS.js index bd2aa780..e21f6f1b 100644 --- a/js/Linear/CLSS.js +++ b/js/Linear/CLSS.js @@ -35,18 +35,18 @@ function CLSS() { return options; } CLSS.prototype.set = function CLSS() { - this.A = parseFloat(arguments[0]["A"]) - this.B = parseFloat(arguments[0]["B"]) - this.C = parseFloat(arguments[0]["C"]) - this.D = parseFloat(arguments[0]["D"]) - this.x0 = parseFloat(arguments[0]["x0"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==7) { this.exprs = this.exprs[[1:4,7]-1]; } while (true) { - [ok,this.A,this.B,this.C,this.D,this.x0,this.exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),this.exprs); + var ok = true; + this.A = parseFloat(arguments[0]["A"]); + this.B = parseFloat(arguments[0]["B"]); + this.C = parseFloat(arguments[0]["C"]); + this.D = parseFloat(arguments[0]["D"]); + this.x0 = parseFloat(arguments[0]["x0"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js index d8232101..44bbfe9a 100644 --- a/js/Linear/CLSS_f.js +++ b/js/Linear/CLSS_f.js @@ -35,18 +35,18 @@ function CLSS_f() { return options; } CLSS_f.prototype.set = function CLSS_f() { - this.A = parseFloat(arguments[0]["A"]) - this.B = parseFloat(arguments[0]["B"]) - this.C = parseFloat(arguments[0]["C"]) - this.D = parseFloat(arguments[0]["D"]) - this.x0 = parseFloat(arguments[0]["x0"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==7) { this.exprs = this.exprs[[1:4,7]-1]; } while (true) { - [ok,this.A,this.B,this.C,this.D,this.x0,this.exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),this.exprs); + var ok = true; + this.A = parseFloat(arguments[0]["A"]); + this.B = parseFloat(arguments[0]["B"]); + this.C = parseFloat(arguments[0]["C"]); + this.D = parseFloat(arguments[0]["D"]); + this.x0 = parseFloat(arguments[0]["x0"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/DELAYV_f.js b/js/Linear/DELAYV_f.js index 7677921c..516a768a 100644 --- a/js/Linear/DELAYV_f.js +++ b/js/Linear/DELAYV_f.js @@ -33,17 +33,17 @@ function DELAYV_f() { return options; } DELAYV_f.prototype.set = function DELAYV_f() { - this.nin = parseFloat(arguments[0]["nin"]) - this.zz0 = inverse(arguments[0]["zz0"]) - this.T = parseFloat(arguments[0]["T"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; this.nin = this.model.in[1-1]; var z0 = this.model.dstate; this.zz0 = z0.slice(1-1,$-1); var told = z0[$-1]; while (true) { - [ok,this.nin,this.zz0,this.T,this.exprs] = scicos_getvalue("Set delay parameters",["Number of inputs","Register initial condition","Max delay"],list("vec",1,"vec",-1,"vec",1),this.exprs); + var ok = true; + this.nin = parseFloat(arguments[0]["nin"]); + this.zz0 = inverse(arguments[0]["zz0"]); + this.T = parseFloat(arguments[0]["T"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/DELAY_f.js b/js/Linear/DELAY_f.js index 32549d82..29c1728a 100644 --- a/js/Linear/DELAY_f.js +++ b/js/Linear/DELAY_f.js @@ -76,9 +76,6 @@ function DELAY_f() { return options; } DELAY_f.prototype.set = function DELAY_f() { - this.dt = arguments[0]["dt"] - this.z0 = arguments[0]["z0"] - this.exprs = inverse(arguments[0]["exprs"]) var ppath = list(0,0); if (typeof(o)=="Block"&&o.gui=="REGISTER_f") { ppath[1-1] = i; @@ -97,7 +94,10 @@ function DELAY_f() { var evtdly_exprs = evtdly.graphics.exprs; this.exprs = [[evtdly_exprs[1-1]],[register_exprs]]; while (true) { - [ok,this.dt,this.z0,this.exprs] = scicos_getvalue([["This block implements as a discretized delay"],["it is consist of a shift register and a clock"],["value of the delay is given by;","the discretization time step multiplied by the"],["number-1 of state of the register"]],["Discretization time step","Register initial state"],list("vec",1,"vec",-1),this.exprs); + var ok = true; + this.dt = arguments[0]["dt"]; + this.z0 = arguments[0]["z0"]; + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js index 8167fd08..90f18fe0 100644 --- a/js/Linear/DIFF_c.js +++ b/js/Linear/DIFF_c.js @@ -25,13 +25,13 @@ function DIFF_c() { return options; } DIFF_c.prototype.set = function DIFF_c() { - this.x0 = inverse(arguments[0]["x0"]) - this.xd0 = inverse(arguments[0]["xd0"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { var ask_again = false; - [ok,this.x0,this.xd0,this.exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",-1,"vec",-1),this.exprs); + var ok = true; + this.x0 = inverse(arguments[0]["x0"]); + this.xd0 = inverse(arguments[0]["xd0"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js index 301fee22..8c49bb7a 100644 --- a/js/Linear/DLR.js +++ b/js/Linear/DLR.js @@ -31,16 +31,16 @@ function DLR() { return options; } DLR.prototype.set = function DLR() { - this.num = arguments[0]["num"] - this.den = arguments[0]["den"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var x0 = this.model.dstate; var ns = prod(size(x0)); var PREVAR_scicos_context = PREVAR_scicos_context; PREVAR_scicos_context.z = %z; while (true) { - [ok,this.num,this.den,this.exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),this.exprs); + var ok = true; + this.num = arguments[0]["num"]; + this.den = arguments[0]["den"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/DLR_f.js b/js/Linear/DLR_f.js index 382213dc..89555f7c 100644 --- a/js/Linear/DLR_f.js +++ b/js/Linear/DLR_f.js @@ -31,16 +31,16 @@ function DLR_f() { return options; } DLR_f.prototype.set = function DLR_f() { - this.num = arguments[0]["num"] - this.den = arguments[0]["den"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var x0 = this.model.dstate; var ns = prod(size(x0)); var PREVAR_scicos_context = PREVAR_scicos_context; PREVAR_scicos_context.z = %z; while (true) { - [ok,this.num,this.den,this.exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),this.exprs); + var ok = true; + this.num = arguments[0]["num"]; + this.den = arguments[0]["den"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/DLSS.js b/js/Linear/DLSS.js index 686c712e..2199795a 100644 --- a/js/Linear/DLSS.js +++ b/js/Linear/DLSS.js @@ -34,18 +34,18 @@ function DLSS() { return options; } DLSS.prototype.set = function DLSS() { - this.A = parseFloat(arguments[0]["A"]) - this.B = parseFloat(arguments[0]["B"]) - this.C = parseFloat(arguments[0]["C"]) - this.D = parseFloat(arguments[0]["D"]) - this.x0 = parseFloat(arguments[0]["x0"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==7) { this.exprs = this.exprs[[1:4,7]-1]; } while (true) { - [ok,this.A,this.B,this.C,this.D,this.x0,this.exprs] = scicos_getvalue("Set discrete linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),this.exprs); + var ok = true; + this.A = parseFloat(arguments[0]["A"]); + this.B = parseFloat(arguments[0]["B"]); + this.C = parseFloat(arguments[0]["C"]); + this.D = parseFloat(arguments[0]["D"]); + this.x0 = parseFloat(arguments[0]["x0"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/DLSS_f.js b/js/Linear/DLSS_f.js index a1f27482..6c4d8d62 100644 --- a/js/Linear/DLSS_f.js +++ b/js/Linear/DLSS_f.js @@ -34,18 +34,18 @@ function DLSS_f() { return options; } DLSS_f.prototype.set = function DLSS_f() { - this.A = parseFloat(arguments[0]["A"]) - this.B = parseFloat(arguments[0]["B"]) - this.C = parseFloat(arguments[0]["C"]) - this.D = parseFloat(arguments[0]["D"]) - this.x0 = parseFloat(arguments[0]["x0"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==7) { this.exprs = this.exprs[[1:4,7]-1]; } while (true) { - [ok,this.A,this.B,this.C,this.D,this.x0,this.exprs] = scicos_getvalue("Set discrete linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),this.exprs); + var ok = true; + this.A = parseFloat(arguments[0]["A"]); + this.B = parseFloat(arguments[0]["B"]); + this.C = parseFloat(arguments[0]["C"]); + this.D = parseFloat(arguments[0]["D"]); + this.x0 = parseFloat(arguments[0]["x0"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/DOLLAR.js b/js/Linear/DOLLAR.js index 6541259b..e8a5e691 100644 --- a/js/Linear/DOLLAR.js +++ b/js/Linear/DOLLAR.js @@ -28,15 +28,15 @@ function DOLLAR() { return options; } DOLLAR.prototype.set = function DOLLAR() { - this.a = arguments[0]["a"] - this.inh = parseFloat(arguments[0]["inh"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; if (size(this.exprs,"*")<2) { this.exprs[2-1] = "0"; } while (true) { - [ok,this.a,this.inh,this.exprs] = scicos_getvalue("Set 1/z block parameters",["initial condition","Inherit (no:0, yes:1)"],list("mat",[-1,-2],"vec",-1),this.exprs); + var ok = true; + this.a = arguments[0]["a"]; + this.inh = parseFloat(arguments[0]["inh"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/DOLLAR_f.js b/js/Linear/DOLLAR_f.js index 2d580656..34b17900 100644 --- a/js/Linear/DOLLAR_f.js +++ b/js/Linear/DOLLAR_f.js @@ -28,15 +28,15 @@ function DOLLAR_f() { return options; } DOLLAR_f.prototype.set = function DOLLAR_f() { - this.a = arguments[0]["a"] - this.inh = parseFloat(arguments[0]["inh"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; if (size(this.exprs,"*")<2) { this.exprs[2-1] = "0"; } while (true) { - [ok,this.a,this.inh,this.exprs] = scicos_getvalue("Set 1/z block parameters",["initial condition","Inherit (no:0, yes:1)"],list("vec",-1,"vec",-1),this.exprs); + var ok = true; + this.a = arguments[0]["a"]; + this.inh = parseFloat(arguments[0]["inh"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js index e33e3d33..6648cf45 100644 --- a/js/Linear/DOLLAR_m.js +++ b/js/Linear/DOLLAR_m.js @@ -28,15 +28,15 @@ function DOLLAR_m() { return options; } DOLLAR_m.prototype.set = function DOLLAR_m() { - this.a = arguments[0]["a"] - this.inh = parseFloat(arguments[0]["inh"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; if (size(this.exprs,"*")<2) { this.exprs[2-1] = "0"; } while (true) { - [ok,this.a,this.inh,this.exprs] = scicos_getvalue("Set 1/z block parameters",["initial condition","Inherit (no:0, yes:1)"],list("mat",[-1,-2],"vec",-1),this.exprs); + var ok = true; + this.a = arguments[0]["a"]; + this.inh = parseFloat(arguments[0]["inh"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js index 69ba2837..4299056b 100644 --- a/js/Linear/GAINBLK.js +++ b/js/Linear/GAINBLK.js @@ -31,15 +31,15 @@ function GAINBLK() { return options; } GAINBLK.prototype.set = function GAINBLK() { - this.gain = parseFloat(arguments[0]["gain"]) - this.over = arguments[0]["over"] - this.exprs = inverse(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==1) { this.exprs = [[this.exprs],[sci2exp(0)]]; } while (true) { - [ok,this.gain,this.over,this.exprs] = scicos_getvalue("Set gain block parameters",["Gain","Do On Overflow(0=Nothing 1=Saturate 2=Error)"],list("mat",[-1,-1],"vec",1),this.exprs); + var ok = true; + this.gain = parseFloat(arguments[0]["gain"]); + this.over = arguments[0]["over"]; + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js index 2b768006..200dd3ee 100644 --- a/js/Linear/GAINBLK_f.js +++ b/js/Linear/GAINBLK_f.js @@ -26,11 +26,11 @@ function GAINBLK_f() { return options; } GAINBLK_f.prototype.set = function GAINBLK_f() { - this.gain = parseFloat(arguments[0]["gain"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.gain,this.exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),this.exprs[1-1]); + var ok = true; + this.gain = parseFloat(arguments[0]["gain"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js index 026f9ccb..bdf478e3 100644 --- a/js/Linear/GAIN_f.js +++ b/js/Linear/GAIN_f.js @@ -26,11 +26,11 @@ function GAIN_f() { return options; } GAIN_f.prototype.set = function GAIN_f() { - this.gain = parseFloat(arguments[0]["gain"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.gain,this.exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),this.exprs[1-1]); + var ok = true; + this.gain = parseFloat(arguments[0]["gain"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js index b2aabccd..881a01b5 100644 --- a/js/Linear/INTEGRAL.js +++ b/js/Linear/INTEGRAL.js @@ -32,15 +32,15 @@ function INTEGRAL() { return options; } INTEGRAL.prototype.set = function INTEGRAL() { - this.x0 = inverse(arguments[0]["x0"]) - this.reinit = parseFloat(arguments[0]["reinit"]) - this.satur = parseFloat(arguments[0]["satur"]) - this.maxp = parseFloat(arguments[0]["maxp"]) - this.lowp = arguments[0]["lowp"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,this.exprs] = scicos_getvalue("Set Integral block parameters",["Initial Condition","With re-intialization (1:yes, 0:no)","With saturation (1:yes, 0:no)","Upper limit","Lower limit"],list("vec",-1,"vec",1,"vec",1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.x0 = inverse(arguments[0]["x0"]); + this.reinit = parseFloat(arguments[0]["reinit"]); + this.satur = parseFloat(arguments[0]["satur"]); + this.maxp = parseFloat(arguments[0]["maxp"]); + this.lowp = arguments[0]["lowp"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js index ba635b5b..46bc238b 100644 --- a/js/Linear/INTEGRAL_f.js +++ b/js/Linear/INTEGRAL_f.js @@ -23,11 +23,11 @@ function INTEGRAL_f() { return options; } INTEGRAL_f.prototype.set = function INTEGRAL_f() { - this.x0 = parseFloat(arguments[0]["x0"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.x0,this.exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),this.exprs); + var ok = true; + this.x0 = parseFloat(arguments[0]["x0"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js index a3e59a09..15b3d3c5 100644 --- a/js/Linear/INTEGRAL_m.js +++ b/js/Linear/INTEGRAL_m.js @@ -33,15 +33,15 @@ function INTEGRAL_m() { return options; } INTEGRAL_m.prototype.set = function INTEGRAL_m() { - this.x0 = arguments[0]["x0"] - this.reinit = parseFloat(arguments[0]["reinit"]) - this.satur = parseFloat(arguments[0]["satur"]) - this.maxp = parseFloat(arguments[0]["maxp"]) - this.lowp = parseFloat(arguments[0]["lowp"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,this.exprs] = scicos_getvalue("Set Integral block parameters",["Initial Condition","With re-intialization (1:yes, 0:no)","With saturation (1:yes, 0:no)","Upper limit","Lower limit"],list("mat",[-1,-1],"vec",1,"vec",1,"mat",[-1,-1],"mat",[-1,-1]),this.exprs); + var ok = true; + this.x0 = arguments[0]["x0"]; + this.reinit = parseFloat(arguments[0]["reinit"]); + this.satur = parseFloat(arguments[0]["satur"]); + this.maxp = parseFloat(arguments[0]["maxp"]); + this.lowp = parseFloat(arguments[0]["lowp"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/PID.js b/js/Linear/PID.js index 5e6e980e..3bb0299f 100644 --- a/js/Linear/PID.js +++ b/js/Linear/PID.js @@ -51,10 +51,6 @@ function PID() { return options; } PID.prototype.set = function PID() { - this.p = arguments[0]["p"] - this.i = arguments[0]["i"] - this.d = arguments[0]["d"] - this.exprs0 = arguments[0]["exprs0"] var ppath = list(0,0,0); if (typeof(o)=="Link") { if (from.gui=="GAINBLK") { @@ -90,7 +86,11 @@ function PID() { var d_old = xx3.model.rpar; var y = 0; while (true) { - [ok,this.p,this.i,this.d,this.exprs0] = scicos_getvalue("Set PID parameters",["Proportional","Integral","Derivation"],list("vec",-1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.p = arguments[0]["p"]; + this.i = arguments[0]["i"]; + this.d = arguments[0]["d"]; + this.exprs0 = arguments[0]["exprs0"]; if (!ok) { break; } diff --git a/js/Linear/REGISTER.js b/js/Linear/REGISTER.js index f4e7e926..8334361f 100644 --- a/js/Linear/REGISTER.js +++ b/js/Linear/REGISTER.js @@ -26,15 +26,15 @@ function REGISTER() { return options; } REGISTER.prototype.set = function REGISTER() { - this.z0 = parseFloat(arguments[0]["z0"]) - this.it = arguments[0]["it"] - this.exprs = inverse(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,1)==1) { this.exprs = [[this.exprs],[sci2exp(1)]]; } while (true) { - [ok,this.z0,this.it,this.exprs] = scicos_getvalue("Set delay parameters",["Register initial condition","Datatype (1=double 3=int32 ...)"],list("vec",-1,"vec",1),this.exprs); + var ok = true; + this.z0 = parseFloat(arguments[0]["z0"]); + this.it = arguments[0]["it"]; + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js index b593af07..86c7e1ef 100644 --- a/js/Linear/REGISTER_f.js +++ b/js/Linear/REGISTER_f.js @@ -24,11 +24,11 @@ function REGISTER_f() { return options; } REGISTER_f.prototype.set = function REGISTER_f() { - this.z0 = parseFloat(arguments[0]["z0"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.z0,this.exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),this.exprs); + var ok = true; + this.z0 = parseFloat(arguments[0]["z0"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js index efc1adcc..7260e0e0 100644 --- a/js/Linear/SAMPHOLD_m.js +++ b/js/Linear/SAMPHOLD_m.js @@ -27,12 +27,12 @@ function SAMPHOLD_m() { return options; } SAMPHOLD_m.prototype.set = function SAMPHOLD_m() { - this.it = arguments[0]["it"] - this.exprs = arguments[0]["exprs"] this.x.model.firing = []; var label = this.graphics.exprs; while (true) { - [ok,this.it,this.exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label); + var ok = true; + this.it = arguments[0]["it"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/SUMMATION.js b/js/Linear/SUMMATION.js index 905cc973..11251563 100644 --- a/js/Linear/SUMMATION.js +++ b/js/Linear/SUMMATION.js @@ -28,10 +28,6 @@ function SUMMATION() { return options; } SUMMATION.prototype.set = function SUMMATION() { - this.Datatype = arguments[0]["Datatype"] - this.sgn = inverse(arguments[0]["sgn"]) - this.satur = arguments[0]["satur"] - this.exprs = inverse(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,1)==1) { this.exprs = [[sci2exp(1)],[this.exprs],[sci2exp(0)]]; @@ -39,7 +35,11 @@ function SUMMATION() { this.exprs = [[this.exprs],[sci2exp(0)]]; } while (true) { - [ok,this.Datatype,this.sgn,this.satur,this.exprs] = scicos_getvalue("Set sum block parameters",["Datatype (1=real double 2=complex 3=int32 ...)","Number of inputs or sign vector (of +1, -1)","Do on Overflow(0=Nothing 1=Saturate 2=Error)"],list("vec",1,"vec",-1,"vec",1),this.exprs); + var ok = true; + this.Datatype = arguments[0]["Datatype"]; + this.sgn = inverse(arguments[0]["sgn"]); + this.satur = arguments[0]["satur"]; + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/TCLSS.js b/js/Linear/TCLSS.js index 56aa6d16..7be300d4 100644 --- a/js/Linear/TCLSS.js +++ b/js/Linear/TCLSS.js @@ -37,18 +37,18 @@ function TCLSS() { return options; } TCLSS.prototype.set = function TCLSS() { - this.A = parseFloat(arguments[0]["A"]) - this.B = parseFloat(arguments[0]["B"]) - this.C = parseFloat(arguments[0]["C"]) - this.D = parseFloat(arguments[0]["D"]) - this.x0 = parseFloat(arguments[0]["x0"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==7) { this.exprs = this.exprs[[1:4,7]-1]; } while (true) { - [ok,this.A,this.B,this.C,this.D,this.x0,this.exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),this.exprs); + var ok = true; + this.A = parseFloat(arguments[0]["A"]); + this.B = parseFloat(arguments[0]["B"]); + this.C = parseFloat(arguments[0]["C"]); + this.D = parseFloat(arguments[0]["D"]); + this.x0 = parseFloat(arguments[0]["x0"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/TCLSS_f.js b/js/Linear/TCLSS_f.js index e224fbf0..db3d2625 100644 --- a/js/Linear/TCLSS_f.js +++ b/js/Linear/TCLSS_f.js @@ -37,18 +37,18 @@ function TCLSS_f() { return options; } TCLSS_f.prototype.set = function TCLSS_f() { - this.A = parseFloat(arguments[0]["A"]) - this.B = parseFloat(arguments[0]["B"]) - this.C = parseFloat(arguments[0]["C"]) - this.D = parseFloat(arguments[0]["D"]) - this.x0 = parseFloat(arguments[0]["x0"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==7) { this.exprs = this.exprs[[1:4,7]-1]; } while (true) { - [ok,this.A,this.B,this.C,this.D,this.x0,this.exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),this.exprs); + var ok = true; + this.A = parseFloat(arguments[0]["A"]); + this.B = parseFloat(arguments[0]["B"]); + this.C = parseFloat(arguments[0]["C"]); + this.D = parseFloat(arguments[0]["D"]); + this.x0 = parseFloat(arguments[0]["x0"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js index 6898b79a..1edc0c4a 100644 --- a/js/Linear/TIME_DELAY.js +++ b/js/Linear/TIME_DELAY.js @@ -30,14 +30,14 @@ function TIME_DELAY() { return options; } TIME_DELAY.prototype.set = function TIME_DELAY() { - this.T = parseFloat(arguments[0]["T"]) - this.init = parseFloat(arguments[0]["init"]) - this.N = parseFloat(arguments[0]["N"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var nin = this.model.in[1-1]; while (true) { - [ok,this.T,this.init,this.N,this.exprs] = scicos_getvalue("Set delay parameters",["Delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.T = parseFloat(arguments[0]["T"]); + this.init = parseFloat(arguments[0]["init"]); + this.N = parseFloat(arguments[0]["N"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Linear/VARIABLE_DELAY.js b/js/Linear/VARIABLE_DELAY.js index 1a0c4bfc..02c8efe1 100644 --- a/js/Linear/VARIABLE_DELAY.js +++ b/js/Linear/VARIABLE_DELAY.js @@ -30,14 +30,14 @@ function VARIABLE_DELAY() { return options; } VARIABLE_DELAY.prototype.set = function VARIABLE_DELAY() { - this.T = parseFloat(arguments[0]["T"]) - this.init = parseFloat(arguments[0]["init"]) - this.N = parseFloat(arguments[0]["N"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var nin = this.model.in[1-1]; while (true) { - [ok,this.T,this.init,this.N,this.exprs] = scicos_getvalue("Set delay parameters",["Max delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.T = parseFloat(arguments[0]["T"]); + this.init = parseFloat(arguments[0]["init"]); + this.N = parseFloat(arguments[0]["N"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/CUMSUM.js b/js/MatrixOp/CUMSUM.js index 82680d40..5369128f 100644 --- a/js/MatrixOp/CUMSUM.js +++ b/js/MatrixOp/CUMSUM.js @@ -36,15 +36,15 @@ function CUMSUM() { return options; } CUMSUM.prototype.set = function CUMSUM() { - this.typ = inverse(arguments[0]["typ"]) - this.decomptyp = arguments[0]["decomptyp"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set CUMSUM block parameters",["Datatype(1=real double 2=Complex)","Sum along (0=the first non singleton dimension 1=Rows 2=Columns)"],list("vec",1,"vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.decomptyp = arguments[0]["decomptyp"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/EXTRACT.js b/js/MatrixOp/EXTRACT.js index 3bf7f5f9..4df55b66 100644 --- a/js/MatrixOp/EXTRACT.js +++ b/js/MatrixOp/EXTRACT.js @@ -37,16 +37,16 @@ function EXTRACT() { return options; } EXTRACT.prototype.set = function EXTRACT() { - this.typ = inverse(arguments[0]["typ"]) - this.a = inverse(arguments[0]["a"]) - this.b = inverse(arguments[0]["b"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.a,this.b,this.exprs] = scicos_getvalue("Set EXTRACT Block",["Datatype (1=real double 2=Complex)","Lines to extract","Columns to extract"],list("vec",1,"mat",[1,-1],"mat",[1,-1]),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.a = inverse(arguments[0]["a"]); + this.b = inverse(arguments[0]["b"]); + this.exprs = arguments[0]["exprs"]; this.a = this.a.slice(); this.b = this.b.slice(); if (!ok) { diff --git a/js/MatrixOp/EXTTRI.js b/js/MatrixOp/EXTTRI.js index aa605214..51c3ebe0 100644 --- a/js/MatrixOp/EXTTRI.js +++ b/js/MatrixOp/EXTTRI.js @@ -36,15 +36,15 @@ function EXTTRI() { return options; } EXTTRI.prototype.set = function EXTTRI() { - this.typ = inverse(arguments[0]["typ"]) - this.decomptyp = arguments[0]["decomptyp"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set EXTTRI block parameters",["Datatype(1=real double 2=Complex)","extraction type (1=lower 2=upper 3=diagonal)"],list("vec",1,"vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.decomptyp = arguments[0]["decomptyp"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATBKSL.js b/js/MatrixOp/MATBKSL.js index 1abaa75b..d7302c49 100644 --- a/js/MatrixOp/MATBKSL.js +++ b/js/MatrixOp/MATBKSL.js @@ -35,14 +35,14 @@ function MATBKSL() { return options; } MATBKSL.prototype.set = function MATBKSL() { - this.typ = inverse(arguments[0]["typ"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.exprs] = scicos_getvalue("Set MATBKSL Block",["Datatype (1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATCATH.js b/js/MatrixOp/MATCATH.js index 36708895..55112b29 100644 --- a/js/MatrixOp/MATCATH.js +++ b/js/MatrixOp/MATCATH.js @@ -35,14 +35,14 @@ function MATCATH() { return options; } MATCATH.prototype.set = function MATCATH() { - this.nin = arguments[0]["nin"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")>1) { var label = "size(evstr("+label[2-1]+"),\'*\')"; } while (true) { - [ok,this.nin,this.lab] = scicos_getvalue("Set MATCATH block parameters",["Number of input"],list("vec",1),label); + var ok = true; + this.nin = arguments[0]["nin"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATCATV.js b/js/MatrixOp/MATCATV.js index 70b11951..05ce4e0e 100644 --- a/js/MatrixOp/MATCATV.js +++ b/js/MatrixOp/MATCATV.js @@ -36,14 +36,14 @@ function MATCATV() { return options; } MATCATV.prototype.set = function MATCATV() { - this.nin = arguments[0]["nin"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")>1) { var label = "size(evstr("+label[2-1]+"),\'*\')"; } while (true) { - [ok,this.nin,this.lab] = scicos_getvalue("Set MATCATV block parameters",["Number od inputs"],list("vec",1),label); + var ok = true; + this.nin = arguments[0]["nin"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATDET.js b/js/MatrixOp/MATDET.js index 995c94a4..1cea77be 100644 --- a/js/MatrixOp/MATDET.js +++ b/js/MatrixOp/MATDET.js @@ -35,14 +35,14 @@ function MATDET() { return options; } MATDET.prototype.set = function MATDET() { - this.typ = inverse(arguments[0]["typ"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.exprs] = scicos_getvalue("Set MATDET Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATDIAG.js b/js/MatrixOp/MATDIAG.js index aa80bfe1..03c618e4 100644 --- a/js/MatrixOp/MATDIAG.js +++ b/js/MatrixOp/MATDIAG.js @@ -35,14 +35,14 @@ function MATDIAG() { return options; } MATDIAG.prototype.set = function MATDIAG() { - this.typ = inverse(arguments[0]["typ"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.exprs] = scicos_getvalue("Set MATDIAG Block",["Datatype (1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATDIV.js b/js/MatrixOp/MATDIV.js index 35b81a81..5122e3b0 100644 --- a/js/MatrixOp/MATDIV.js +++ b/js/MatrixOp/MATDIV.js @@ -35,14 +35,14 @@ function MATDIV() { return options; } MATDIV.prototype.set = function MATDIV() { - this.typ = inverse(arguments[0]["typ"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.exprs] = scicos_getvalue("Set MATDIV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATEIG.js b/js/MatrixOp/MATEIG.js index 56a5dab1..8c5f72bc 100644 --- a/js/MatrixOp/MATEIG.js +++ b/js/MatrixOp/MATEIG.js @@ -36,15 +36,15 @@ function MATEIG() { return options; } MATEIG.prototype.set = function MATEIG() { - this.typ = inverse(arguments[0]["typ"]) - this.decomptyp = arguments[0]["decomptyp"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set MATEIG block parameters",["Datatype(1=real double 2=Complex)","decomposition type (1=eig values 2=eig values+eig vectors"],list("vec",1,"vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.decomptyp = arguments[0]["decomptyp"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATEXPM.js b/js/MatrixOp/MATEXPM.js index 7e96b899..1c074bc1 100644 --- a/js/MatrixOp/MATEXPM.js +++ b/js/MatrixOp/MATEXPM.js @@ -35,14 +35,14 @@ function MATEXPM() { return options; } MATEXPM.prototype.set = function MATEXPM() { - this.typ = inverse(arguments[0]["typ"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.exprs] = scicos_getvalue("Set EXPM Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATINV.js b/js/MatrixOp/MATINV.js index aed1155e..e8531268 100644 --- a/js/MatrixOp/MATINV.js +++ b/js/MatrixOp/MATINV.js @@ -35,14 +35,14 @@ function MATINV() { return options; } MATINV.prototype.set = function MATINV() { - this.typ = inverse(arguments[0]["typ"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.exprs] = scicos_getvalue("Set MATINV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATLU.js b/js/MatrixOp/MATLU.js index 5d119e87..535d5d9a 100644 --- a/js/MatrixOp/MATLU.js +++ b/js/MatrixOp/MATLU.js @@ -35,14 +35,14 @@ function MATLU() { return options; } MATLU.prototype.set = function MATLU() { - this.typ = inverse(arguments[0]["typ"]) - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.lab] = scicos_getvalue("Set MATLU block parameters",["Datatype(1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATMAGPHI.js b/js/MatrixOp/MATMAGPHI.js index 85b9dfa5..a99bd0f0 100644 --- a/js/MatrixOp/MATMAGPHI.js +++ b/js/MatrixOp/MATMAGPHI.js @@ -35,14 +35,14 @@ function MATMAGPHI() { return options; } MATMAGPHI.prototype.set = function MATMAGPHI() { - this.decomptyp = arguments[0]["decomptyp"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.decomptyp,this.lab] = scicos_getvalue("Set MATMAGPHI block parameters",["decomposition type (1=Complex2MAG&PHI 2=MAG&PHI2Complex)"],list("vec",1),label); + var ok = true; + this.decomptyp = arguments[0]["decomptyp"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATMUL.js b/js/MatrixOp/MATMUL.js index d19732dd..2cdd00a2 100644 --- a/js/MatrixOp/MATMUL.js +++ b/js/MatrixOp/MATMUL.js @@ -26,10 +26,6 @@ function MATMUL() { return options; } MATMUL.prototype.set = function MATMUL() { - this.dtype = arguments[0]["dtype"] - this.rule = parseFloat(arguments[0]["rule"]) - this.np = parseFloat(arguments[0]["np"]) - this.exprs = arguments[0]["exprs"] this.graphics = this.x.graphics; var label = this.graphics.exprs; this.model = this.x.model; @@ -43,7 +39,11 @@ function MATMUL() { label[3-1] = sci2exp(1); } while (true) { - [ok,this.dtype,this.rule,this.np,this.exprs] = scicos_getvalue([["Set MATMUL parameter"],["For the Multipication rule:"],[" 1= Matrix by Matrix"],[" 2= Matrix by Matrix element wise "],[" 3= Matrix by Scalar"],["In the third case the second input will be the scalar"]],["Datatype(1=real double 2=Complex 3=int32 ...)","Multiplication rule","Do on Overflow(0=Nothing 1=Saturate 2=Error)"],list("vec",1,"vec",1,"vec",1),label); + var ok = true; + this.dtype = arguments[0]["dtype"]; + this.rule = parseFloat(arguments[0]["rule"]); + this.np = parseFloat(arguments[0]["np"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATPINV.js b/js/MatrixOp/MATPINV.js index 64fc901c..c214b727 100644 --- a/js/MatrixOp/MATPINV.js +++ b/js/MatrixOp/MATPINV.js @@ -35,14 +35,14 @@ function MATPINV() { return options; } MATPINV.prototype.set = function MATPINV() { - this.typ = inverse(arguments[0]["typ"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.exprs] = scicos_getvalue("Set MATPINV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATRESH.js b/js/MatrixOp/MATRESH.js index 2dd99416..ed92363f 100644 --- a/js/MatrixOp/MATRESH.js +++ b/js/MatrixOp/MATRESH.js @@ -37,16 +37,16 @@ function MATRESH() { return options; } MATRESH.prototype.set = function MATRESH() { - this.typ = inverse(arguments[0]["typ"]) - this.l1 = arguments[0]["l1"] - this.out = arguments[0]["out"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.l1,this.out,this.lab] = scicos_getvalue("Set MATRESH block parameters",["Datatype(1=real double 2=Complex)","input size","output size desired"],list("vec",-1,"vec",-1,"vec",-1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.l1 = arguments[0]["l1"]; + this.out = arguments[0]["out"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATSING.js b/js/MatrixOp/MATSING.js index 68f78b93..37cb4d71 100644 --- a/js/MatrixOp/MATSING.js +++ b/js/MatrixOp/MATSING.js @@ -36,15 +36,15 @@ function MATSING() { return options; } MATSING.prototype.set = function MATSING() { - this.typ = inverse(arguments[0]["typ"]) - this.decomptyp = arguments[0]["decomptyp"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set MATSVD block parameters",["Datatype(1=real double 2=Complex)","decomposition type (1=singular values 2=sing values+matrix U & V)"],list("vec",1,"vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.decomptyp = arguments[0]["decomptyp"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATSUM.js b/js/MatrixOp/MATSUM.js index c2e55a3e..897d1a1d 100644 --- a/js/MatrixOp/MATSUM.js +++ b/js/MatrixOp/MATSUM.js @@ -36,15 +36,15 @@ function MATSUM() { return options; } MATSUM.prototype.set = function MATSUM() { - this.typ = inverse(arguments[0]["typ"]) - this.decomptyp = arguments[0]["decomptyp"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set MATSUM block parameters",["Datatype(1=real double 2=Complex)","Sum along (0=all 1=lines 2=Columns)"],list("vec",1,"vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.decomptyp = arguments[0]["decomptyp"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATTRAN.js b/js/MatrixOp/MATTRAN.js index 94b4c12c..c95b11f3 100644 --- a/js/MatrixOp/MATTRAN.js +++ b/js/MatrixOp/MATTRAN.js @@ -24,15 +24,15 @@ function MATTRAN() { return options; } MATTRAN.prototype.set = function MATTRAN() { - this.typ = inverse(arguments[0]["typ"]) - this.rule = arguments[0]["rule"] - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==1) { label[2-1] = sci2exp(1); } while (true) { - [ok,this.typ,this.rule,this.exprs] = scicos_getvalue("Set MATTRAN Block",["Datatype(1=real double 2=Complex)","rule (1=.\' 2=\')"],list("vec",1,"vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.rule = arguments[0]["rule"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/MATZREIM.js b/js/MatrixOp/MATZREIM.js index f58b1726..f6319315 100644 --- a/js/MatrixOp/MATZREIM.js +++ b/js/MatrixOp/MATZREIM.js @@ -35,14 +35,14 @@ function MATZREIM() { return options; } MATZREIM.prototype.set = function MATZREIM() { - this.decomptyp = arguments[0]["decomptyp"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.decomptyp,this.lab] = scicos_getvalue("Set MATZREIM block parameters",["decomposition type (1=Complex2Real&Imag 2=Real&Imag2Complex)"],list("vec",1),label); + var ok = true; + this.decomptyp = arguments[0]["decomptyp"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/MatrixOp/RICC.js b/js/MatrixOp/RICC.js index 5633712b..4573a534 100644 --- a/js/MatrixOp/RICC.js +++ b/js/MatrixOp/RICC.js @@ -36,15 +36,15 @@ function RICC() { return options; } RICC.prototype.set = function RICC() { - this.tpe = arguments[0]["tpe"] - this.mod = arguments[0]["mod"] - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.tpe,this.mod,this.exprs] = scicos_getvalue("Set RICC Block",["Type (1=Cont 2=Disc)","Model(1=Schr 2=sign(cont) inv(disc))"],list("vec",1,"vec",1),label); + var ok = true; + this.tpe = arguments[0]["tpe"]; + this.mod = arguments[0]["mod"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/ROOTCOEF.js b/js/MatrixOp/ROOTCOEF.js index 479c317d..e4211b16 100644 --- a/js/MatrixOp/ROOTCOEF.js +++ b/js/MatrixOp/ROOTCOEF.js @@ -36,15 +36,15 @@ function ROOTCOEF() { return options; } ROOTCOEF.prototype.set = function ROOTCOEF() { - this.typ = inverse(arguments[0]["typ"]) - this.inp = arguments[0]["inp"] - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.typ,this.inp,this.exprs] = scicos_getvalue("Set ROOTCOEF Block",["Datatype(1=real double 2=Complex)","input row size"],list("vec",1,"vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.inp = arguments[0]["inp"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/SQRT.js b/js/MatrixOp/SQRT.js index 517f55dd..c1268dbd 100644 --- a/js/MatrixOp/SQRT.js +++ b/js/MatrixOp/SQRT.js @@ -25,11 +25,11 @@ function SQRT() { return options; } SQRT.prototype.set = function SQRT() { - this.typ = inverse(arguments[0]["typ"]) - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; while (true) { - [ok,this.typ,this.exprs] = scicos_getvalue("Set SQRT Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/MatrixOp/SUBMAT.js b/js/MatrixOp/SUBMAT.js index b02901ec..978c41c0 100644 --- a/js/MatrixOp/SUBMAT.js +++ b/js/MatrixOp/SUBMAT.js @@ -40,19 +40,19 @@ function SUBMAT() { return options; } SUBMAT.prototype.set = function SUBMAT() { - this.typ = inverse(arguments[0]["typ"]) - this.a = arguments[0]["a"] - this.b = arguments[0]["b"] - this.c = arguments[0]["c"] - this.d = arguments[0]["d"] - this.inp = arguments[0]["inp"] - this.exprs = arguments[0]["exprs"] var label = this.graphics.exprs; if (size(label,"*")==5) { label[6-1] = sci2exp([1,1]); } while (true) { - [ok,this.typ,this.a,this.b,this.c,this.d,this.inp,this.exprs] = scicos_getvalue("Set SUBMAT Block",["Datatype (1=real double 2=Complex)","Starting Row Index","Ending Row Index","Starting Column Index","Ending Column Index","Input Dimensions"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",2),label); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.a = arguments[0]["a"]; + this.b = arguments[0]["b"]; + this.c = arguments[0]["c"]; + this.d = arguments[0]["d"]; + this.inp = arguments[0]["inp"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/BACKLASH.js b/js/Misc/BACKLASH.js index 2af53279..f7d1aeb8 100644 --- a/js/Misc/BACKLASH.js +++ b/js/Misc/BACKLASH.js @@ -26,14 +26,14 @@ function BACKLASH() { return options; } BACKLASH.prototype.set = function BACKLASH() { - this.ini = arguments[0]["ini"] - this.gap = arguments[0]["gap"] - this.zcr = arguments[0]["zcr"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var rpar = this.model.rpar; while (true) { - [ok,this.ini,this.gap,this.zcr,this.exprs] = scicos_getvalue("Set backlash parameters",["initial output","gap","use zero-crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.ini = arguments[0]["ini"]; + this.gap = arguments[0]["gap"]; + this.zcr = arguments[0]["zcr"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/BOUNCE.js b/js/Misc/BOUNCE.js index c2c9867f..eb7f94d9 100644 --- a/js/Misc/BOUNCE.js +++ b/js/Misc/BOUNCE.js @@ -56,23 +56,23 @@ function BOUNCE() { return options; } BOUNCE.prototype.set = function BOUNCE() { - this.rpar1 = parseFloat(arguments[0]["rpar1"]) - this.rpar2 = parseFloat(arguments[0]["rpar2"]) - this.walls = inverse(arguments[0]["walls"]) - this.xt = inverse(arguments[0]["xt"]) - this.xd = inverse(arguments[0]["xd"]) - this.y = inverse(arguments[0]["y"]) - this.yd = inverse(arguments[0]["yd"]) - this.g = parseFloat(arguments[0]["g"]) - this.C = parseFloat(arguments[0]["C"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; if (size(this.exprs,"*")<9) { this.exprs[8-1] = "9.81"; this.exprs[9-1] = "0"; } while (true) { - [ok,this.rpar1,this.rpar2,this.walls,this.xt,this.xd,this.y,this.yd,this.g,this.C,this.exprs] = scicos_getvalue(["Set Bounce Block"],["Mass","Radius","[xmin,xmax,ymin,ymax]","xpos","xdpos","ypos","ydpos","g (gravity)","C (aerodynamic coeff"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.rpar1 = parseFloat(arguments[0]["rpar1"]); + this.rpar2 = parseFloat(arguments[0]["rpar2"]); + this.walls = inverse(arguments[0]["walls"]); + this.xt = inverse(arguments[0]["xt"]); + this.xd = inverse(arguments[0]["xd"]); + this.y = inverse(arguments[0]["y"]); + this.yd = inverse(arguments[0]["yd"]); + this.g = parseFloat(arguments[0]["g"]); + this.C = parseFloat(arguments[0]["C"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/BOUNCEXY.js b/js/Misc/BOUNCEXY.js index 0eed5d47..9c4ba130 100644 --- a/js/Misc/BOUNCEXY.js +++ b/js/Misc/BOUNCEXY.js @@ -52,19 +52,19 @@ function BOUNCEXY() { return options; } BOUNCEXY.prototype.set = function BOUNCEXY() { - this.clrs = inverse(arguments[0]["clrs"]) - this.siz = inverse(arguments[0]["siz"]) - this.win = parseFloat(arguments[0]["win"]) - this.imode = parseFloat(arguments[0]["imode"]) - this.xmin = parseFloat(arguments[0]["xmin"]) - this.xmax = parseFloat(arguments[0]["xmax"]) - this.ymin = parseFloat(arguments[0]["ymin"]) - this.ymax = parseFloat(arguments[0]["ymax"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var dstate = this.model.dstate; while (true) { - [ok,this.clrs,this.siz,this.win,this.imode,this.xmin,this.xmax,this.ymin,this.ymax,this.exprs] = scicos_getvalue("Set Scope parameters",["colors","radii","window number (-1 for automatic)","animation mode (0,1)","Xmin","Xmax","Ymin","Ymax"],list("vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.clrs = inverse(arguments[0]["clrs"]); + this.siz = inverse(arguments[0]["siz"]); + this.win = parseFloat(arguments[0]["win"]); + this.imode = parseFloat(arguments[0]["imode"]); + this.xmin = parseFloat(arguments[0]["xmin"]); + this.xmax = parseFloat(arguments[0]["xmax"]); + this.ymin = parseFloat(arguments[0]["ymin"]); + this.ymax = parseFloat(arguments[0]["ymax"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/BPLATFORM.js b/js/Misc/BPLATFORM.js index 49243956..c614d905 100644 --- a/js/Misc/BPLATFORM.js +++ b/js/Misc/BPLATFORM.js @@ -37,18 +37,18 @@ function BPLATFORM() { return options; } BPLATFORM.prototype.set = function BPLATFORM() { - this.plen = parseFloat(arguments[0]["plen"]) - this.csiz = parseFloat(arguments[0]["csiz"]) - this.phi = parseFloat(arguments[0]["phi"]) - this.xmin = parseFloat(arguments[0]["xmin"]) - this.xmax = parseFloat(arguments[0]["xmax"]) - this.ymin = parseFloat(arguments[0]["ymin"]) - this.ymax = parseFloat(arguments[0]["ymax"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var dstate = this.model.dstate; while (true) { - [ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,this.exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.plen = parseFloat(arguments[0]["plen"]); + this.csiz = parseFloat(arguments[0]["csiz"]); + this.phi = parseFloat(arguments[0]["phi"]); + this.xmin = parseFloat(arguments[0]["xmin"]); + this.xmax = parseFloat(arguments[0]["xmax"]); + this.ymin = parseFloat(arguments[0]["ymin"]); + this.ymax = parseFloat(arguments[0]["ymax"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/CBLOCK.js b/js/Misc/CBLOCK.js index 91a8a55a..358b939f 100644 --- a/js/Misc/CBLOCK.js +++ b/js/Misc/CBLOCK.js @@ -55,24 +55,24 @@ function CBLOCK() { return options; } CBLOCK.prototype.set = function CBLOCK() { - this.function_name = arguments[0]["function_name"] - this.impli = arguments[0]["impli"] - this.i = parseFloat(arguments[0]["i"]) - this.o = parseFloat(arguments[0]["o"]) - this.ci = parseFloat(arguments[0]["ci"]) - this.co = parseFloat(arguments[0]["co"]) - this.xx = inverse(arguments[0]["xx"]) - this.ng = parseFloat(arguments[0]["ng"]) - this.z = inverse(arguments[0]["z"]) - this.rpar = inverse(arguments[0]["rpar"]) - this.ipar = inverse(arguments[0]["ipar"]) - this.auto0 = arguments[0]["auto0"] - this.depu = parseBoolean(arguments[0]["depu"]) - this.dept = parseBoolean(arguments[0]["dept"]) - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; while (true) { - [ok,this.function_name,this.impli,this.i,this.o,this.ci,this.co,this.xx,this.ng,this.z,this.rpar,this.ipar,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set C-Block2 block parameters",["simulation function","is block implicit? (y,n)","input ports sizes","output ports sizes","input event ports sizes","output events ports sizes","initial continuous state","number of zero crossing surfaces","initial discrete state","Real parameters vector","Integer parameters vector","initial firing vector (<0 for no firing)","direct feedthrough (y or n)","time dependence (y or n)"],list("str",1,"str",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)","str",1,"str",1),label[1-1]); + var ok = true; + this.function_name = arguments[0]["function_name"]; + this.impli = arguments[0]["impli"]; + this.i = parseFloat(arguments[0]["i"]); + this.o = parseFloat(arguments[0]["o"]); + this.ci = parseFloat(arguments[0]["ci"]); + this.co = parseFloat(arguments[0]["co"]); + this.xx = inverse(arguments[0]["xx"]); + this.ng = parseFloat(arguments[0]["ng"]); + this.z = inverse(arguments[0]["z"]); + this.rpar = inverse(arguments[0]["rpar"]); + this.ipar = inverse(arguments[0]["ipar"]); + this.auto0 = arguments[0]["auto0"]; + this.depu = parseBoolean(arguments[0]["depu"]); + this.dept = parseBoolean(arguments[0]["dept"]); + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/Misc/CBLOCK4.js b/js/Misc/CBLOCK4.js index 915c5299..0172f4e3 100644 --- a/js/Misc/CBLOCK4.js +++ b/js/Misc/CBLOCK4.js @@ -44,29 +44,29 @@ function CBLOCK4() { return options; } CBLOCK4.prototype.set = function CBLOCK4() { - this.function_name = arguments[0]["function_name"] - this.impli = arguments[0]["impli"] - this.in1 = arguments[0]["in1"] - this.it = arguments[0]["it"] - this.out = arguments[0]["out"] - this.ot = arguments[0]["ot"] - this.ci = parseFloat(arguments[0]["ci"]) - this.co = parseFloat(arguments[0]["co"]) - this.xx = inverse(arguments[0]["xx"]) - this.z = inverse(arguments[0]["z"]) - this.oz = arguments[0]["oz"] - this.rpar = inverse(arguments[0]["rpar"]) - this.ipar = parseFloat(arguments[0]["ipar"]) - this.opar = arguments[0]["opar"] - this.nmode = arguments[0]["nmode"] - this.nzcr = arguments[0]["nzcr"] - this.auto0 = arguments[0]["auto0"] - this.depu = parseBoolean(arguments[0]["depu"]) - this.dept = parseBoolean(arguments[0]["dept"]) - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; while (true) { - [ok,this.function_name,this.impli,this.in1,this.it,this.out,this.ot,this.ci,this.co,this.xx,this.z,this.oz,this.rpar,this.ipar,this.opar,this.nmode,this.nzcr,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set C-Block4 block parameters",["Simulation function","Is block implicit? (y,n)","Input ports sizes","Input ports type","Output port sizes","Output ports type","Input event ports sizes","Output events ports sizes","Initial continuous state","Initial discrete state","Initial object state","Real parameters vector","Integer parameters vector","Object parameters list","Number of modes","Number of zero crossings","Initial firing vector (<0 for no firing)","Direct feedthrough (y or n)","Time dependence (y or n)"],list("str",1,"str",1,"mat",[-1,2],"vec",-1,"mat",[-1,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)","str",1,"str",1),label[1-1]); + var ok = true; + this.function_name = arguments[0]["function_name"]; + this.impli = arguments[0]["impli"]; + this.in1 = arguments[0]["in1"]; + this.it = arguments[0]["it"]; + this.out = arguments[0]["out"]; + this.ot = arguments[0]["ot"]; + this.ci = parseFloat(arguments[0]["ci"]); + this.co = parseFloat(arguments[0]["co"]); + this.xx = inverse(arguments[0]["xx"]); + this.z = inverse(arguments[0]["z"]); + this.oz = arguments[0]["oz"]; + this.rpar = inverse(arguments[0]["rpar"]); + this.ipar = parseFloat(arguments[0]["ipar"]); + this.opar = arguments[0]["opar"]; + this.nmode = arguments[0]["nmode"]; + this.nzcr = arguments[0]["nzcr"]; + this.auto0 = arguments[0]["auto0"]; + this.depu = parseBoolean(arguments[0]["depu"]); + this.dept = parseBoolean(arguments[0]["dept"]); + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/Misc/CONSTRAINT2_c.js b/js/Misc/CONSTRAINT2_c.js index 07f4f1bc..6916d8da 100644 --- a/js/Misc/CONSTRAINT2_c.js +++ b/js/Misc/CONSTRAINT2_c.js @@ -29,14 +29,14 @@ function CONSTRAINT2_c() { return options; } CONSTRAINT2_c.prototype.set = function CONSTRAINT2_c() { - this.x0 = inverse(arguments[0]["x0"]) - this.xd0 = inverse(arguments[0]["xd0"]) - this.id = inverse(arguments[0]["id"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { var ask_again = false; - [ok,this.x0,this.xd0,this.id,this.exprs] = scicos_getvalue("Set Constraint block parameters",["Initial guess values of states x","Initial guess values of derivative x\'","Id(i)=1: if x\'(i) is present in the feedback, else Id(i)=0"],list("vec",-1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.x0 = inverse(arguments[0]["x0"]); + this.xd0 = inverse(arguments[0]["xd0"]); + this.id = inverse(arguments[0]["id"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/CONSTRAINT_c.js b/js/Misc/CONSTRAINT_c.js index 0ea8c789..c372580e 100644 --- a/js/Misc/CONSTRAINT_c.js +++ b/js/Misc/CONSTRAINT_c.js @@ -24,11 +24,11 @@ function CONSTRAINT_c() { return options; } CONSTRAINT_c.prototype.set = function CONSTRAINT_c() { - this.x0 = inverse(arguments[0]["x0"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.x0,this.exprs] = scicos_getvalue("Set solver block parameters","Initial guess values",list("vec",-1),this.exprs); + var ok = true; + this.x0 = inverse(arguments[0]["x0"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/DEADBAND.js b/js/Misc/DEADBAND.js index 8bf9884b..d0edaae8 100644 --- a/js/Misc/DEADBAND.js +++ b/js/Misc/DEADBAND.js @@ -30,13 +30,13 @@ function DEADBAND() { return options; } DEADBAND.prototype.set = function DEADBAND() { - this.maxp = parseFloat(arguments[0]["maxp"]) - this.minp = parseFloat(arguments[0]["minp"]) - this.zeroc = arguments[0]["zeroc"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.maxp,this.minp,this.zeroc,this.exprs] = scicos_getvalue("Set Deadband parameters",["End of dead band","Start of dead band","zero crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.maxp = parseFloat(arguments[0]["maxp"]); + this.minp = parseFloat(arguments[0]["minp"]); + this.zeroc = arguments[0]["zeroc"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/DIFF_f.js b/js/Misc/DIFF_f.js index d6a523c2..1f777149 100644 --- a/js/Misc/DIFF_f.js +++ b/js/Misc/DIFF_f.js @@ -25,12 +25,12 @@ function DIFF_f() { return options; } DIFF_f.prototype.set = function DIFF_f() { - this.x0 = inverse(arguments[0]["x0"]) - this.xd0 = arguments[0]["xd0"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.x0,this.xd0,this.exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.x0 = inverse(arguments[0]["x0"]); + this.xd0 = arguments[0]["xd0"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/EDGETRIGGER.js b/js/Misc/EDGETRIGGER.js index 04b3881a..172dbfb1 100644 --- a/js/Misc/EDGETRIGGER.js +++ b/js/Misc/EDGETRIGGER.js @@ -26,11 +26,11 @@ function EDGETRIGGER() { return options; } EDGETRIGGER.prototype.set = function EDGETRIGGER() { - this.edge = parseFloat(arguments[0]["edge"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.edge,this.exprs] = scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),this.exprs); + var ok = true; + this.edge = parseFloat(arguments[0]["edge"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/HYSTHERESIS.js b/js/Misc/HYSTHERESIS.js index f63ef6b7..4379ca68 100644 --- a/js/Misc/HYSTHERESIS.js +++ b/js/Misc/HYSTHERESIS.js @@ -33,15 +33,15 @@ function HYSTHERESIS() { return options; } HYSTHERESIS.prototype.set = function HYSTHERESIS() { - this.high_lim = arguments[0]["high_lim"] - this.low_lim = arguments[0]["low_lim"] - this.out_high = arguments[0]["out_high"] - this.out_low = arguments[0]["out_low"] - this.nzz = parseFloat(arguments[0]["nzz"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.high_lim,this.low_lim,this.out_high,this.out_low,this.nzz,this.exprs] = scicos_getvalue("Set parameters",["switch on at","switch off at","output when on","output when off","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.high_lim = arguments[0]["high_lim"]; + this.low_lim = arguments[0]["low_lim"]; + this.out_high = arguments[0]["out_high"]; + this.out_low = arguments[0]["out_low"]; + this.nzz = parseFloat(arguments[0]["nzz"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/LOGICAL_OP.js b/js/Misc/LOGICAL_OP.js index b0884b8d..6c13e6bd 100644 --- a/js/Misc/LOGICAL_OP.js +++ b/js/Misc/LOGICAL_OP.js @@ -29,17 +29,17 @@ function LOGICAL_OP() { return options; } LOGICAL_OP.prototype.set = function LOGICAL_OP() { - this.nin = parseFloat(arguments[0]["nin"]) - this.rule = parseFloat(arguments[0]["rule"]) - this.Datatype = arguments[0]["Datatype"] - this.tp = parseFloat(arguments[0]["tp"]) - this.exprs = inverse(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,1)==2) { this.exprs = [[this.exprs],[sci2exp(1)],[sci2exp(0)]]; } while (true) { - [ok,this.nin,this.rule,this.Datatype,this.tp,this.exprs] = scicos_getvalue("Set parameters",["number of inputs","Operator: AND (0), OR (1), NAND (2), NOR (3), XOR (4), NOT (5)","Datatype (1=double 3=int32 ...)","Bitwise Rule(0=No 1=yes)"],list("vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.nin = parseFloat(arguments[0]["nin"]); + this.rule = parseFloat(arguments[0]["rule"]); + this.Datatype = arguments[0]["Datatype"]; + this.tp = parseFloat(arguments[0]["tp"]); + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Misc/MBLOCK.js b/js/Misc/MBLOCK.js index 44c8ca1c..456a536a 100644 --- a/js/Misc/MBLOCK.js +++ b/js/Misc/MBLOCK.js @@ -48,14 +48,6 @@ function MBLOCK() { return options; } MBLOCK.prototype.set = function MBLOCK() { - this.Tin = arguments[0]["Tin"] - this.Tintype = arguments[0]["Tintype"] - this.Tout = arguments[0]["Tout"] - this.Touttype = arguments[0]["Touttype"] - this.Tparam = arguments[0]["Tparam"] - this.pprop = inverse(arguments[0]["pprop"]) - this.Tfunam = arguments[0]["Tfunam"] - this.lab_1 = arguments[0]["lab_1"] this.exprs = this.graphics.exprs; if (this.type[this.exprs-1]==15) { var paramv = list(); @@ -69,7 +61,15 @@ function MBLOCK() { this.lab_1 = list(this.exprs.in,this.exprs.intype,this.exprs.out,this.exprs.outtype,this.exprs.param,this.exprs.pprop,this.exprs.nameF); var lab_2 = this.exprs.paramv; while (true) { - [ok,this.Tin,this.Tintype,this.Tout,this.Touttype,this.Tparam,this.pprop,this.Tfunam,this.lab_1] = scicos_getvalue("Set Modelica generic block parameters",["Input variables: ","Input variables types: ","Output variables: ","Output variables types:","Parameters in Modelica:","Parameters properties: ","Function name: "],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),this.lab_1); + var ok = true; + this.Tin = arguments[0]["Tin"]; + this.Tintype = arguments[0]["Tintype"]; + this.Tout = arguments[0]["Tout"]; + this.Touttype = arguments[0]["Touttype"]; + this.Tparam = arguments[0]["Tparam"]; + this.pprop = inverse(arguments[0]["pprop"]); + this.Tfunam = arguments[0]["Tfunam"]; + this.lab_1 = arguments[0]["lab_1"]; if (!ok) { break; } diff --git a/js/Misc/MEMORY_f.js b/js/Misc/MEMORY_f.js index f3687612..018d8f17 100644 --- a/js/Misc/MEMORY_f.js +++ b/js/Misc/MEMORY_f.js @@ -28,12 +28,12 @@ function MEMORY_f() { return options; } MEMORY_f.prototype.set = function MEMORY_f() { - this.a = arguments[0]["a"] - this.inh = parseFloat(arguments[0]["inh"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.a,this.inh,this.exprs] = scicos_getvalue("Set memory block parameters",["initial condition","Inherit (1: no, 0: yes)"],list("vec",-1,"vec",1),this.exprs); + var ok = true; + this.a = arguments[0]["a"]; + this.inh = parseFloat(arguments[0]["inh"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/PENDULUM_ANIM.js b/js/Misc/PENDULUM_ANIM.js index c38cbcb4..d2ebdc63 100644 --- a/js/Misc/PENDULUM_ANIM.js +++ b/js/Misc/PENDULUM_ANIM.js @@ -37,18 +37,18 @@ function PENDULUM_ANIM() { return options; } PENDULUM_ANIM.prototype.set = function PENDULUM_ANIM() { - this.plen = parseFloat(arguments[0]["plen"]) - this.csiz = parseFloat(arguments[0]["csiz"]) - this.phi = parseFloat(arguments[0]["phi"]) - this.xmin = parseFloat(arguments[0]["xmin"]) - this.xmax = parseFloat(arguments[0]["xmax"]) - this.ymin = parseFloat(arguments[0]["ymin"]) - this.ymax = parseFloat(arguments[0]["ymax"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var dstate = this.model.dstate; while (true) { - [ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,this.exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.plen = parseFloat(arguments[0]["plen"]); + this.csiz = parseFloat(arguments[0]["csiz"]); + this.phi = parseFloat(arguments[0]["phi"]); + this.xmin = parseFloat(arguments[0]["xmin"]); + this.xmax = parseFloat(arguments[0]["xmax"]); + this.ymin = parseFloat(arguments[0]["ymin"]); + this.ymax = parseFloat(arguments[0]["ymax"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/RATELIMITER.js b/js/Misc/RATELIMITER.js index 0e61e53a..6f8e1174 100644 --- a/js/Misc/RATELIMITER.js +++ b/js/Misc/RATELIMITER.js @@ -27,12 +27,12 @@ function RATELIMITER() { return options; } RATELIMITER.prototype.set = function RATELIMITER() { - this.maxp = parseFloat(arguments[0]["maxp"]) - this.minp = parseFloat(arguments[0]["minp"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.maxp,this.minp,this.exprs] = scicos_getvalue("Set rate limiter parameters",["max slope","min slope"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.maxp = parseFloat(arguments[0]["maxp"]); + this.minp = parseFloat(arguments[0]["minp"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Misc/RELATIONALOP.js b/js/Misc/RELATIONALOP.js index f9089a4a..16a72e3b 100644 --- a/js/Misc/RELATIONALOP.js +++ b/js/Misc/RELATIONALOP.js @@ -28,16 +28,16 @@ function RELATIONALOP() { return options; } RELATIONALOP.prototype.set = function RELATIONALOP() { - this.rule = parseFloat(arguments[0]["rule"]) - this.zcr = parseFloat(arguments[0]["zcr"]) - this.Datatype = arguments[0]["Datatype"] - this.exprs = inverse(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,1)==2) { this.exprs = [[this.exprs],[sci2exp(1)]]; } while (true) { - [ok,this.rule,this.zcr,this.Datatype,this.exprs] = scicos_getvalue("Set parameters",["Operator: == (0), ~= (1), < (2), <= (3), > (4), >= (5)","Use zero crossing (no: 0), (yes: 1)","Datatype (1=double 3=int32 ...)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.rule = parseFloat(arguments[0]["rule"]); + this.zcr = parseFloat(arguments[0]["zcr"]); + this.Datatype = arguments[0]["Datatype"]; + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Misc/TEXT_f.js b/js/Misc/TEXT_f.js index f459c135..3272f8ee 100644 --- a/js/Misc/TEXT_f.js +++ b/js/Misc/TEXT_f.js @@ -27,17 +27,17 @@ function TEXT_f() { return options; } TEXT_f.prototype.set = function TEXT_f() { - this.txt = arguments[0]["txt"] - this.font = parseFloat(arguments[0]["font"]) - this.siz = parseFloat(arguments[0]["siz"]) - this.exprs = inverse(arguments[0]["exprs"]) var orig = this.graphics.orig; this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==1) { this.exprs = [[this.exprs],["3"],["1"]]; } while (true) { - [ok,this.txt,this.font,this.siz,this.exprs] = scicos_getvalue("Set Text block parameters",["Text","Font number","Font size"],list("str",-1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.txt = arguments[0]["txt"]; + this.font = parseFloat(arguments[0]["font"]); + this.siz = parseFloat(arguments[0]["siz"]); + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Misc/c_block.js b/js/Misc/c_block.js index 553a7e12..37872f1a 100644 --- a/js/Misc/c_block.js +++ b/js/Misc/c_block.js @@ -42,14 +42,14 @@ function c_block() { return options; } c_block.prototype.set = function c_block() { - this.i = parseFloat(arguments[0]["i"]) - this.o = parseFloat(arguments[0]["o"]) - this.rpar = inverse(arguments[0]["rpar"]) - this.funam = arguments[0]["funam"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; while (true) { - [ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set C_block parameters",["input ports sizes","output port sizes","System parameters vector","function name"],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]); + var ok = true; + this.i = parseFloat(arguments[0]["i"]); + this.o = parseFloat(arguments[0]["o"]); + this.rpar = inverse(arguments[0]["rpar"]); + this.funam = arguments[0]["funam"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/Misc/fortran_block.js b/js/Misc/fortran_block.js index 7b7c2e6e..a4399fa0 100644 --- a/js/Misc/fortran_block.js +++ b/js/Misc/fortran_block.js @@ -33,14 +33,14 @@ function fortran_block() { return options; } fortran_block.prototype.set = function fortran_block() { - this.i = parseFloat(arguments[0]["i"]) - this.o = parseFloat(arguments[0]["o"]) - this.rpar = inverse(arguments[0]["rpar"]) - this.funam = arguments[0]["funam"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; while (true) { - [ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set fortran_block parameters",["input ports sizes","output port sizes","System parameters vector","function name"],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]); + var ok = true; + this.i = parseFloat(arguments[0]["i"]); + this.o = parseFloat(arguments[0]["o"]); + this.rpar = inverse(arguments[0]["rpar"]); + this.funam = arguments[0]["funam"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/Misc/generic_block.js b/js/Misc/generic_block.js index c8ef0332..bbda2bd2 100644 --- a/js/Misc/generic_block.js +++ b/js/Misc/generic_block.js @@ -43,26 +43,26 @@ function generic_block() { return options; } generic_block.prototype.set = function generic_block() { - this.function_name = arguments[0]["function_name"] - this.funtyp = parseFloat(arguments[0]["funtyp"]) - this.i = parseFloat(arguments[0]["i"]) - this.o = parseFloat(arguments[0]["o"]) - this.ci = parseFloat(arguments[0]["ci"]) - this.co = parseFloat(arguments[0]["co"]) - this.xx = inverse(arguments[0]["xx"]) - this.z = inverse(arguments[0]["z"]) - this.rpar = inverse(arguments[0]["rpar"]) - this.ipar = parseFloat(arguments[0]["ipar"]) - this.auto0 = arguments[0]["auto0"] - this.depu = parseBoolean(arguments[0]["depu"]) - this.dept = parseBoolean(arguments[0]["dept"]) - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.function_name,this.funtyp,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.ipar,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set GENERIC block parameters",["simulation function","function type (0,1,2,..)","input ports sizes","output port sizes","input event ports sizes","output events ports sizes","initial continuous state","initial discrete state","Real parameters vector","Integer parameters vector","initial firing vector (<0 for no firing)","direct feedthrough (y or n)","time dependence (y or n)"],list("str",1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)","str",1,"str",1),label); + var ok = true; + this.function_name = arguments[0]["function_name"]; + this.funtyp = parseFloat(arguments[0]["funtyp"]); + this.i = parseFloat(arguments[0]["i"]); + this.o = parseFloat(arguments[0]["o"]); + this.ci = parseFloat(arguments[0]["ci"]); + this.co = parseFloat(arguments[0]["co"]); + this.xx = inverse(arguments[0]["xx"]); + this.z = inverse(arguments[0]["z"]); + this.rpar = inverse(arguments[0]["rpar"]); + this.ipar = parseFloat(arguments[0]["ipar"]); + this.auto0 = arguments[0]["auto0"]; + this.depu = parseBoolean(arguments[0]["depu"]); + this.dept = parseBoolean(arguments[0]["dept"]); + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/Misc/generic_block2.js b/js/Misc/generic_block2.js index ccd515b7..963e475f 100644 --- a/js/Misc/generic_block2.js +++ b/js/Misc/generic_block2.js @@ -45,28 +45,28 @@ function generic_block2() { return options; } generic_block2.prototype.set = function generic_block2() { - this.function_name = arguments[0]["function_name"] - this.funtyp = parseFloat(arguments[0]["funtyp"]) - this.i = parseFloat(arguments[0]["i"]) - this.o = parseFloat(arguments[0]["o"]) - this.ci = parseFloat(arguments[0]["ci"]) - this.co = parseFloat(arguments[0]["co"]) - this.xx = inverse(arguments[0]["xx"]) - this.z = inverse(arguments[0]["z"]) - this.rpar = inverse(arguments[0]["rpar"]) - this.ipar = parseFloat(arguments[0]["ipar"]) - this.nmode = arguments[0]["nmode"] - this.nzcr = arguments[0]["nzcr"] - this.auto0 = arguments[0]["auto0"] - this.depu = parseBoolean(arguments[0]["depu"]) - this.dept = parseBoolean(arguments[0]["dept"]) - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.function_name,this.funtyp,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.ipar,this.nmode,this.nzcr,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set GENERIC block parameters",["simulation function","function type (0,1,2,..)","input ports sizes","output port sizes","input event ports sizes","output events ports sizes","initial continuous state","initial discrete state","Real parameters vector","Integer parameters vector","number of modes","number of zero_crossings","initial firing vector (<0 for no firing)","direct feedthrough (y or n)","time dependence (y or n)"],list("str",1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec","sum(%6)","str",1,"str",1),label); + var ok = true; + this.function_name = arguments[0]["function_name"]; + this.funtyp = parseFloat(arguments[0]["funtyp"]); + this.i = parseFloat(arguments[0]["i"]); + this.o = parseFloat(arguments[0]["o"]); + this.ci = parseFloat(arguments[0]["ci"]); + this.co = parseFloat(arguments[0]["co"]); + this.xx = inverse(arguments[0]["xx"]); + this.z = inverse(arguments[0]["z"]); + this.rpar = inverse(arguments[0]["rpar"]); + this.ipar = parseFloat(arguments[0]["ipar"]); + this.nmode = arguments[0]["nmode"]; + this.nzcr = arguments[0]["nzcr"]; + this.auto0 = arguments[0]["auto0"]; + this.depu = parseBoolean(arguments[0]["depu"]); + this.dept = parseBoolean(arguments[0]["dept"]); + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/Misc/generic_block3.js b/js/Misc/generic_block3.js index 63199c40..7312b2ec 100644 --- a/js/Misc/generic_block3.js +++ b/js/Misc/generic_block3.js @@ -45,32 +45,32 @@ function generic_block3() { return options; } generic_block3.prototype.set = function generic_block3() { - this.function_name = arguments[0]["function_name"] - this.funtyp = parseFloat(arguments[0]["funtyp"]) - this.in1 = arguments[0]["in1"] - this.it = arguments[0]["it"] - this.out = arguments[0]["out"] - this.ot = arguments[0]["ot"] - this.ci = parseFloat(arguments[0]["ci"]) - this.co = parseFloat(arguments[0]["co"]) - this.xx = inverse(arguments[0]["xx"]) - this.z = inverse(arguments[0]["z"]) - this.oz = arguments[0]["oz"] - this.rpar = inverse(arguments[0]["rpar"]) - this.ipar = parseFloat(arguments[0]["ipar"]) - this.opar = arguments[0]["opar"] - this.nmode = arguments[0]["nmode"] - this.nzcr = arguments[0]["nzcr"] - this.auto0 = arguments[0]["auto0"] - this.depu = parseBoolean(arguments[0]["depu"]) - this.dept = parseBoolean(arguments[0]["dept"]) - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; if (size(label,"*")==14) { label[9-1] = []; } while (true) { - [ok,this.function_name,this.funtyp,this.in1,this.it,this.out,this.ot,this.ci,this.co,this.xx,this.z,this.oz,this.rpar,this.ipar,this.opar,this.nmode,this.nzcr,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set GENERIC block parameters",["Simulation function","Function type (0,1,2,..)","Input ports sizes","Input ports type","Output port sizes","Output ports type","Input event ports sizes","Output events ports sizes","Initial continuous state","Initial discrete state","Initial object state","Real parameters vector","Integer parameters vector","Object parameters list","Number of modes","Number of zero crossings","Initial firing vector (<0 for no firing)","Direct feedthrough (y or n)","Time dependence (y or n)"],list("str",1,"vec",1,"mat",[-1,2],"vec",-1,"mat",[-1,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)","str",1,"str",1),label); + var ok = true; + this.function_name = arguments[0]["function_name"]; + this.funtyp = parseFloat(arguments[0]["funtyp"]); + this.in1 = arguments[0]["in1"]; + this.it = arguments[0]["it"]; + this.out = arguments[0]["out"]; + this.ot = arguments[0]["ot"]; + this.ci = parseFloat(arguments[0]["ci"]); + this.co = parseFloat(arguments[0]["co"]); + this.xx = inverse(arguments[0]["xx"]); + this.z = inverse(arguments[0]["z"]); + this.oz = arguments[0]["oz"]; + this.rpar = inverse(arguments[0]["rpar"]); + this.ipar = parseFloat(arguments[0]["ipar"]); + this.opar = arguments[0]["opar"]; + this.nmode = arguments[0]["nmode"]; + this.nzcr = arguments[0]["nzcr"]; + this.auto0 = arguments[0]["auto0"]; + this.depu = parseBoolean(arguments[0]["depu"]); + this.dept = parseBoolean(arguments[0]["dept"]); + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/Misc/scifunc_block.js b/js/Misc/scifunc_block.js index f3d4ae44..04ae319a 100644 --- a/js/Misc/scifunc_block.js +++ b/js/Misc/scifunc_block.js @@ -47,23 +47,23 @@ function scifunc_block() { return options; } scifunc_block.prototype.set = function scifunc_block() { - this.i = parseFloat(arguments[0]["i"]) - this.o = parseFloat(arguments[0]["o"]) - this.ci = parseFloat(arguments[0]["ci"]) - this.co = parseFloat(arguments[0]["co"]) - this.xx = inverse(arguments[0]["xx"]) - this.z = inverse(arguments[0]["z"]) - this.rpar = inverse(arguments[0]["rpar"]) - this.auto0 = arguments[0]["auto0"] - this.deptime = arguments[0]["deptime"] - this.lab = arguments[0]["lab"] var needcompile = 0; this.exprs = this.graphics.exprs; if (size(this.exprs[1-1],"*")==8) { this.exprs[1-1][9-1] = "0"; } while (true) { - [ok,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.auto0,this.deptime,this.lab] = scicos_getvalue([["Set scifunc_block parameters"],["only regular blocks supported"]],["input ports sizes","output port sizes","input event ports sizes","output events ports sizes","initial continuous state","initial discrete state","System parameters vector","initial firing vector (<0 for no firing)","is block always active (0:no, 1:yes)"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%4)","vec",1),this.exprs[1-1]); + var ok = true; + this.i = parseFloat(arguments[0]["i"]); + this.o = parseFloat(arguments[0]["o"]); + this.ci = parseFloat(arguments[0]["ci"]); + this.co = parseFloat(arguments[0]["co"]); + this.xx = inverse(arguments[0]["xx"]); + this.z = inverse(arguments[0]["z"]); + this.rpar = inverse(arguments[0]["rpar"]); + this.auto0 = arguments[0]["auto0"]; + this.deptime = arguments[0]["deptime"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/Misc/scifunc_block_m.js b/js/Misc/scifunc_block_m.js index 1933c3b0..554d97ba 100644 --- a/js/Misc/scifunc_block_m.js +++ b/js/Misc/scifunc_block_m.js @@ -52,20 +52,20 @@ function scifunc_block_m() { return options; } scifunc_block_m.prototype.set = function scifunc_block_m() { - this.i = arguments[0]["i"] - this.o = arguments[0]["o"] - this.ci = parseFloat(arguments[0]["ci"]) - this.co = parseFloat(arguments[0]["co"]) - this.xx = inverse(arguments[0]["xx"]) - this.z = inverse(arguments[0]["z"]) - this.rpar = inverse(arguments[0]["rpar"]) - this.auto0 = arguments[0]["auto0"] - this.deptime = arguments[0]["deptime"] - this.lab = arguments[0]["lab"] var needcompile = 0; this.exprs = this.graphics.exprs; while (true) { - [ok,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.auto0,this.deptime,this.lab] = scicos_getvalue([["Set scifunc_block parameters"],["only regular blocks supported"]],["input ports sizes","output port sizes","input event ports sizes","output events ports sizes","initial continuous state","initial discrete state","System parameters vector","initial firing vector (<0 for no firing)","is block always active (0:no, 1:yes)"],list("mat",[-1,2],"mat",[-2,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),this.exprs[1-1]); + var ok = true; + this.i = arguments[0]["i"]; + this.o = arguments[0]["o"]; + this.ci = parseFloat(arguments[0]["ci"]); + this.co = parseFloat(arguments[0]["co"]); + this.xx = inverse(arguments[0]["xx"]); + this.z = inverse(arguments[0]["z"]); + this.rpar = inverse(arguments[0]["rpar"]); + this.auto0 = arguments[0]["auto0"]; + this.deptime = arguments[0]["deptime"]; + this.lab = arguments[0]["lab"]; if (!ok) { break; } diff --git a/js/NonLinear/ABS_VALUE.js b/js/NonLinear/ABS_VALUE.js index 5b092794..5c794d4a 100644 --- a/js/NonLinear/ABS_VALUE.js +++ b/js/NonLinear/ABS_VALUE.js @@ -25,11 +25,11 @@ function ABS_VALUE() { return options; } ABS_VALUE.prototype.set = function ABS_VALUE() { - this.zcr = arguments[0]["zcr"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.zcr,this.exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),this.exprs); + var ok = true; + this.zcr = arguments[0]["zcr"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/DLRADAPT_f.js b/js/NonLinear/DLRADAPT_f.js index b3840590..c32ec428 100644 --- a/js/NonLinear/DLRADAPT_f.js +++ b/js/NonLinear/DLRADAPT_f.js @@ -38,16 +38,16 @@ function DLRADAPT_f() { return options; } DLRADAPT_f.prototype.set = function DLRADAPT_f() { - this.p = inverse(arguments[0]["p"]) - this.rn = inverse(arguments[0]["rn"]) - this.rd = inverse(arguments[0]["rd"]) - this.g = inverse(arguments[0]["g"]) - this.last_u = inverse(arguments[0]["last_u"]) - this.last_y = inverse(arguments[0]["last_y"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.p,this.rn,this.rd,this.g,this.last_u,this.last_y,this.exprs] = scicos_getvalue("Set block parameters",["Vector of p mesh points","Numerator roots (one line for each mesh)","Denominator roots (one line for each mesh)","Vector of gain at mesh points","past inputs (Num degree values)","past outputs (Den degree values)"],list("vec",-1,"mat",[-1,-1],"mat",["size(%1,\'*\')","-1"],"vec","size(%1,\'*\')","vec","size(%2,2)","vec","size(%3,2)"),this.exprs); + var ok = true; + this.p = inverse(arguments[0]["p"]); + this.rn = inverse(arguments[0]["rn"]); + this.rd = inverse(arguments[0]["rd"]); + this.g = inverse(arguments[0]["g"]); + this.last_u = inverse(arguments[0]["last_u"]); + this.last_y = inverse(arguments[0]["last_y"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/EXPBLK_f.js b/js/NonLinear/EXPBLK_f.js index 707d8fd1..bbc0b82d 100644 --- a/js/NonLinear/EXPBLK_f.js +++ b/js/NonLinear/EXPBLK_f.js @@ -24,14 +24,14 @@ function EXPBLK_f() { return options; } EXPBLK_f.prototype.set = function EXPBLK_f() { - this.a = parseFloat(arguments[0]["a"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,this.exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/NonLinear/EXPBLK_m.js b/js/NonLinear/EXPBLK_m.js index ddef6624..c77f7bea 100644 --- a/js/NonLinear/EXPBLK_m.js +++ b/js/NonLinear/EXPBLK_m.js @@ -28,14 +28,14 @@ function EXPBLK_m() { return options; } EXPBLK_m.prototype.set = function EXPBLK_m() { - this.a = parseFloat(arguments[0]["a"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,this.exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/NonLinear/INTRP2BLK_f.js b/js/NonLinear/INTRP2BLK_f.js index 303cdffb..4dee61c9 100644 --- a/js/NonLinear/INTRP2BLK_f.js +++ b/js/NonLinear/INTRP2BLK_f.js @@ -29,13 +29,13 @@ function INTRP2BLK_f() { return options; } INTRP2BLK_f.prototype.set = function INTRP2BLK_f() { - this.a = inverse(arguments[0]["a"]) - this.b = inverse(arguments[0]["b"]) - this.c = inverse(arguments[0]["c"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.a,this.b,this.c,this.exprs] = scicos_getvalue("Set Interpolation block parameters",["X coord.","Y coord.","Z values"],list("vec",-1,"vec",-1,"mat",[-1,-1]),this.exprs); + var ok = true; + this.a = inverse(arguments[0]["a"]); + this.b = inverse(arguments[0]["b"]); + this.c = inverse(arguments[0]["c"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/INTRPLBLK_f.js b/js/NonLinear/INTRPLBLK_f.js index 64077254..8a55302f 100644 --- a/js/NonLinear/INTRPLBLK_f.js +++ b/js/NonLinear/INTRPLBLK_f.js @@ -26,12 +26,12 @@ function INTRPLBLK_f() { return options; } INTRPLBLK_f.prototype.set = function INTRPLBLK_f() { - this.a = inverse(arguments[0]["a"]) - this.b = inverse(arguments[0]["b"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.a,this.b,this.exprs] = scicos_getvalue("Set Interpolation block parameters",["X coord.","Y coord."],list("vec",-1,"vec",-1),this.exprs); + var ok = true; + this.a = inverse(arguments[0]["a"]); + this.b = inverse(arguments[0]["b"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/LOGBLK_f.js b/js/NonLinear/LOGBLK_f.js index 3b97fb56..f244195f 100644 --- a/js/NonLinear/LOGBLK_f.js +++ b/js/NonLinear/LOGBLK_f.js @@ -24,14 +24,14 @@ function LOGBLK_f() { return options; } LOGBLK_f.prototype.set = function LOGBLK_f() { - this.a = parseFloat(arguments[0]["a"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,this.exprs] = scicos_getvalue("Set log block parameters","Basis (>1)",list("vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/NonLinear/LOOKUP2D.js b/js/NonLinear/LOOKUP2D.js index a733a55b..bca63302 100644 --- a/js/NonLinear/LOOKUP2D.js +++ b/js/NonLinear/LOOKUP2D.js @@ -35,18 +35,18 @@ function LOOKUP2D() { return options; } LOOKUP2D.prototype.set = function LOOKUP2D() { - this.xx = inverse(arguments[0]["xx"]) - this.yy = inverse(arguments[0]["yy"]) - this.zz = inverse(arguments[0]["zz"]) - this.Method = parseFloat(arguments[0]["Method"]) - this.graf = arguments[0]["graf"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ok = false; var SaveExit = false; while (true) { var Ask_again = false; - [ok,this.xx,this.yy,this.zz,this.Method,this.graf,this.exprs] = scicos_getvalue("2D Lookup table parameters",["Row index input values","Column index input values","Table data","Lookup method(1..5)","Launch graphic window(y/n)?"],list("vec",-1,"vec",-1,"mat",[-1,-1],"vec",1,"str",1),this.exprs); + var ok = true; + this.xx = inverse(arguments[0]["xx"]); + this.yy = inverse(arguments[0]["yy"]); + this.zz = inverse(arguments[0]["zz"]); + this.Method = parseFloat(arguments[0]["Method"]); + this.graf = arguments[0]["graf"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/LOOKUP_c.js b/js/NonLinear/LOOKUP_c.js index 9666b1c6..bcc1e3e1 100644 --- a/js/NonLinear/LOOKUP_c.js +++ b/js/NonLinear/LOOKUP_c.js @@ -40,18 +40,18 @@ function LOOKUP_c() { return options; } LOOKUP_c.prototype.set = function LOOKUP_c() { - this.Method = parseFloat(arguments[0]["Method"]) - this.xx = inverse(arguments[0]["xx"]) - this.yy = inverse(arguments[0]["yy"]) - this.extrapo = parseFloat(arguments[0]["extrapo"]) - this.graf = arguments[0]["graf"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ok = false; var SaveExit = false; while (true) { var Ask_again = false; - [ok,this.Method,this.xx,this.yy,this.extrapo,this.graf,this.exprs] = scicos_getvalue("Lookup table parameters",["Spline Interpolation method (0..9)","x","y","Extrapolate method (0,1)","Launch graphic window(y/n)?"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"str",1),this.exprs); + var ok = true; + this.Method = parseFloat(arguments[0]["Method"]); + this.xx = inverse(arguments[0]["xx"]); + this.yy = inverse(arguments[0]["yy"]); + this.extrapo = parseFloat(arguments[0]["extrapo"]); + this.graf = arguments[0]["graf"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/MAXMIN.js b/js/NonLinear/MAXMIN.js index d0c04381..4e065441 100644 --- a/js/NonLinear/MAXMIN.js +++ b/js/NonLinear/MAXMIN.js @@ -26,13 +26,13 @@ function MAXMIN() { return options; } MAXMIN.prototype.set = function MAXMIN() { - this.mm = parseFloat(arguments[0]["mm"]) - this.nin = arguments[0]["nin"] - this.zcr = parseFloat(arguments[0]["zcr"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.mm,this.nin,this.zcr,this.exprs] = scicos_getvalue("Set Max/Min block parameters",["Min (1) or Max (2) ","Number of input vectors (1 or 2)","zero-crossing (1: yes, 0;no)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.mm = parseFloat(arguments[0]["mm"]); + this.nin = arguments[0]["nin"]; + this.zcr = parseFloat(arguments[0]["zcr"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/POWBLK_f.js b/js/NonLinear/POWBLK_f.js index a6d2b383..bd307438 100644 --- a/js/NonLinear/POWBLK_f.js +++ b/js/NonLinear/POWBLK_f.js @@ -24,14 +24,14 @@ function POWBLK_f() { return options; } POWBLK_f.prototype.set = function POWBLK_f() { - this.a = parseFloat(arguments[0]["a"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.a,this.exprs] = scicos_getvalue("Set u^a block parameters","to the power of",list("vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/NonLinear/PRODUCT.js b/js/NonLinear/PRODUCT.js index ea3fb92f..bbaef310 100644 --- a/js/NonLinear/PRODUCT.js +++ b/js/NonLinear/PRODUCT.js @@ -23,11 +23,11 @@ function PRODUCT() { return options; } PRODUCT.prototype.set = function PRODUCT() { - this.sgn = inverse(arguments[0]["sgn"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.sgn,this.exprs] = scicos_getvalue([[" Set multiplication block parameters"],["(multiplication is set with + 1, division with -1)"],[""]],"Number of inputs or sign vector",list("vec",-1),this.exprs); + var ok = true; + this.sgn = inverse(arguments[0]["sgn"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/QUANT_f.js b/js/NonLinear/QUANT_f.js index b2642a10..80ff7500 100644 --- a/js/NonLinear/QUANT_f.js +++ b/js/NonLinear/QUANT_f.js @@ -27,12 +27,12 @@ function QUANT_f() { return options; } QUANT_f.prototype.set = function QUANT_f() { - this.pas = parseFloat(arguments[0]["pas"]) - this.meth = parseFloat(arguments[0]["meth"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.pas,this.meth,this.exprs] = scicos_getvalue("Set parameters",["Step","Quantization Type (1-4)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.pas = parseFloat(arguments[0]["pas"]); + this.meth = parseFloat(arguments[0]["meth"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/SATURATION.js b/js/NonLinear/SATURATION.js index c53f10ec..e3db86fe 100644 --- a/js/NonLinear/SATURATION.js +++ b/js/NonLinear/SATURATION.js @@ -30,13 +30,13 @@ function SATURATION() { return options; } SATURATION.prototype.set = function SATURATION() { - this.maxp = parseFloat(arguments[0]["maxp"]) - this.minp = parseFloat(arguments[0]["minp"]) - this.zeroc = arguments[0]["zeroc"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.maxp,this.minp,this.zeroc,this.exprs] = scicos_getvalue("Set Saturation parameters",["Upper limit","Lower limit","zero crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.maxp = parseFloat(arguments[0]["maxp"]); + this.minp = parseFloat(arguments[0]["minp"]); + this.zeroc = arguments[0]["zeroc"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/SAT_f.js b/js/NonLinear/SAT_f.js index 06eaa83f..32c358af 100644 --- a/js/NonLinear/SAT_f.js +++ b/js/NonLinear/SAT_f.js @@ -30,13 +30,13 @@ function SAT_f() { return options; } SAT_f.prototype.set = function SAT_f() { - this.minp = parseFloat(arguments[0]["minp"]) - this.maxp = parseFloat(arguments[0]["maxp"]) - this.pente = arguments[0]["pente"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.minp,this.maxp,this.pente,this.exprs] = scicos_getvalue("Set Saturation parameters",["Min","Max","Slope"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.minp = parseFloat(arguments[0]["minp"]); + this.maxp = parseFloat(arguments[0]["maxp"]); + this.pente = arguments[0]["pente"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/SIGNUM.js b/js/NonLinear/SIGNUM.js index 075f4c92..1e929997 100644 --- a/js/NonLinear/SIGNUM.js +++ b/js/NonLinear/SIGNUM.js @@ -25,11 +25,11 @@ function SIGNUM() { return options; } SIGNUM.prototype.set = function SIGNUM() { - this.zcr = arguments[0]["zcr"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.zcr,this.exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),this.exprs); + var ok = true; + this.zcr = arguments[0]["zcr"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/NonLinear/TrigFun.js b/js/NonLinear/TrigFun.js index a3857b52..78f23521 100644 --- a/js/NonLinear/TrigFun.js +++ b/js/NonLinear/TrigFun.js @@ -21,13 +21,13 @@ function TrigFun() { return options; } TrigFun.prototype.set = function TrigFun() { - this.fun = arguments[0]["fun"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var PREVAR_FF = [["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]]; var PREVAR_GG = [["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]]; while (true) { - [ok,this.fun,this.exprs] = scicos_getvalue(PREVAR_GG,"Function",list("str",1),this.exprs); + var ok = true; + this.fun = arguments[0]["fun"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/PDE/PDE.js b/js/PDE/PDE.js index 816eee7e..e2cbf621 100644 --- a/js/PDE/PDE.js +++ b/js/PDE/PDE.js @@ -23,9 +23,6 @@ function PDE() { return options; } PDE.prototype.set = function PDE() { - this.okk = parseBoolean(arguments[0]["okk"]) - this.rdnom = arguments[0]["rdnom"] - this.lab = arguments[0]["lab"] var label = this.graphics.exprs; var params_pde = label[1-1]; while (true) { @@ -110,7 +107,10 @@ function PDE() { this.rdnom = "PDE"; var ok1 = true; while (true) { - [this.okk,this.rdnom,this.lab] = scicos_getvalue("PLEASE, GIVE US THE BLOCK\'s NAME. ","New block\'s name :",list("str",1),label[3-1]); + var ok = true; + this.okk = parseBoolean(arguments[0]["okk"]); + this.rdnom = arguments[0]["rdnom"]; + this.lab = arguments[0]["lab"]; if (this.okk==false) { var ok1 = false; return; diff --git a/js/Sinks/AFFICH_m.js b/js/Sinks/AFFICH_m.js index 581d2b8b..16850441 100644 --- a/js/Sinks/AFFICH_m.js +++ b/js/Sinks/AFFICH_m.js @@ -39,17 +39,17 @@ function AFFICH_m() { return options; } AFFICH_m.prototype.set = function AFFICH_m() { - this.in1 = inverse(arguments[0]["in1"]) - this.font = parseFloat(arguments[0]["font"]) - this.fontsize = parseFloat(arguments[0]["fontsize"]) - this.colr = parseFloat(arguments[0]["colr"]) - this.nt = parseFloat(arguments[0]["nt"]) - this.nd = parseFloat(arguments[0]["nd"]) - this.herit = arguments[0]["herit"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.in1,this.font,this.fontsize,this.colr,this.nt,this.nd,this.herit,this.exprs] = scicos_getvalue("Set parameters",["Input Size","Font number","Font size","Color","Total number of digits","Number of rational part digits","Block inherits (1) or not (0)"],list("mat",[1,2],"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.in1 = inverse(arguments[0]["in1"]); + this.font = parseFloat(arguments[0]["font"]); + this.fontsize = parseFloat(arguments[0]["fontsize"]); + this.colr = parseFloat(arguments[0]["colr"]); + this.nt = parseFloat(arguments[0]["nt"]); + this.nd = parseFloat(arguments[0]["nd"]); + this.herit = arguments[0]["herit"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/BARXY.js b/js/Sinks/BARXY.js index 6a8e9510..4f117320 100644 --- a/js/Sinks/BARXY.js +++ b/js/Sinks/BARXY.js @@ -35,15 +35,15 @@ function BARXY() { return options; } BARXY.prototype.set = function BARXY() { - this.xmin = parseFloat(arguments[0]["xmin"]) - this.xmax = parseFloat(arguments[0]["xmax"]) - this.ymin = parseFloat(arguments[0]["ymin"]) - this.ymax = parseFloat(arguments[0]["ymax"]) - this.thickness = arguments[0]["thickness"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.xmin,this.xmax,this.ymin,this.ymax,this.thickness,this.exprs] = scicos_getvalue("Set Scope parameters",["Xmin","Xmax","Ymin","Ymax","Segs Thickness"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.xmin = parseFloat(arguments[0]["xmin"]); + this.xmax = parseFloat(arguments[0]["xmax"]); + this.ymin = parseFloat(arguments[0]["ymin"]); + this.ymax = parseFloat(arguments[0]["ymax"]); + this.thickness = arguments[0]["thickness"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CANIMXY.js b/js/Sinks/CANIMXY.js index 89318d22..1b3b23d4 100644 --- a/js/Sinks/CANIMXY.js +++ b/js/Sinks/CANIMXY.js @@ -48,21 +48,21 @@ function CANIMXY() { return options; } CANIMXY.prototype.set = function CANIMXY() { - this.nbr_curves = parseFloat(arguments[0]["nbr_curves"]) - this.clrs = parseFloat(arguments[0]["clrs"]) - this.siz = parseFloat(arguments[0]["siz"]) - this.win = parseFloat(arguments[0]["win"]) - this.wpos = inverse(arguments[0]["wpos"]) - this.wdim = inverse(arguments[0]["wdim"]) - this.xmin = parseFloat(arguments[0]["xmin"]) - this.xmax = parseFloat(arguments[0]["xmax"]) - this.ymin = parseFloat(arguments[0]["ymin"]) - this.ymax = parseFloat(arguments[0]["ymax"]) - this.N = parseFloat(arguments[0]["N"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,this.exprs] = scicos_getvalue("Set Scope parameters",["Number of Curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin","Xmax","Ymin","Ymax","Buffer size"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.nbr_curves = parseFloat(arguments[0]["nbr_curves"]); + this.clrs = parseFloat(arguments[0]["clrs"]); + this.siz = parseFloat(arguments[0]["siz"]); + this.win = parseFloat(arguments[0]["win"]); + this.wpos = inverse(arguments[0]["wpos"]); + this.wdim = inverse(arguments[0]["wdim"]); + this.xmin = parseFloat(arguments[0]["xmin"]); + this.xmax = parseFloat(arguments[0]["xmax"]); + this.ymin = parseFloat(arguments[0]["ymin"]); + this.ymax = parseFloat(arguments[0]["ymax"]); + this.N = parseFloat(arguments[0]["N"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CANIMXY3D.js b/js/Sinks/CANIMXY3D.js index 5208223f..41665f15 100644 --- a/js/Sinks/CANIMXY3D.js +++ b/js/Sinks/CANIMXY3D.js @@ -48,21 +48,21 @@ function CANIMXY3D() { return options; } CANIMXY3D.prototype.set = function CANIMXY3D() { - this.nbr_curves = parseFloat(arguments[0]["nbr_curves"]) - this.clrs = inverse(arguments[0]["clrs"]) - this.siz = inverse(arguments[0]["siz"]) - this.win = parseFloat(arguments[0]["win"]) - this.wpos = inverse(arguments[0]["wpos"]) - this.wdim = inverse(arguments[0]["wdim"]) - this.vec_x = inverse(arguments[0]["vec_x"]) - this.vec_y = inverse(arguments[0]["vec_y"]) - this.vec_z = inverse(arguments[0]["vec_z"]) - this.param3ds = inverse(arguments[0]["param3ds"]) - this.N = parseFloat(arguments[0]["N"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,this.exprs] = scicos_getvalue("Set Scope parameters",["Number of curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin and Xmax","Ymin and Ymax","Zmin and Zmax","Alpha and Theta","Buffer size"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),this.exprs); + var ok = true; + this.nbr_curves = parseFloat(arguments[0]["nbr_curves"]); + this.clrs = inverse(arguments[0]["clrs"]); + this.siz = inverse(arguments[0]["siz"]); + this.win = parseFloat(arguments[0]["win"]); + this.wpos = inverse(arguments[0]["wpos"]); + this.wdim = inverse(arguments[0]["wdim"]); + this.vec_x = inverse(arguments[0]["vec_x"]); + this.vec_y = inverse(arguments[0]["vec_y"]); + this.vec_z = inverse(arguments[0]["vec_z"]); + this.param3ds = inverse(arguments[0]["param3ds"]); + this.N = parseFloat(arguments[0]["N"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CEVENTSCOPE.js b/js/Sinks/CEVENTSCOPE.js index 5f14a547..772b4ff2 100644 --- a/js/Sinks/CEVENTSCOPE.js +++ b/js/Sinks/CEVENTSCOPE.js @@ -34,16 +34,16 @@ function CEVENTSCOPE() { return options; } CEVENTSCOPE.prototype.set = function CEVENTSCOPE() { - this.nclock = parseFloat(arguments[0]["nclock"]) - this.clrs = inverse(arguments[0]["clrs"]) - this.win = parseFloat(arguments[0]["win"]) - this.wpos = inverse(arguments[0]["wpos"]) - this.wdim = inverse(arguments[0]["wdim"]) - this.per = parseFloat(arguments[0]["per"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nclock,this.clrs,this.win,this.wpos,this.wdim,this.per,this.exprs] = scicos_getvalue("Set Scope parameters",["Number of event inputs","colors c (>0) or mark (<0)","Output window number (-1 for automatic)","Output window position","Output window sizes","Refresh period"],list("vec",1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",1),this.exprs); + var ok = true; + this.nclock = parseFloat(arguments[0]["nclock"]); + this.clrs = inverse(arguments[0]["clrs"]); + this.win = parseFloat(arguments[0]["win"]); + this.wpos = inverse(arguments[0]["wpos"]); + this.wdim = inverse(arguments[0]["wdim"]); + this.per = parseFloat(arguments[0]["per"]); + this.exprs = arguments[0]["exprs"]; this.nclock = int(this.nclock); this.clrs = int(this.clrs); this.win = int(this.win); diff --git a/js/Sinks/CFSCOPE.js b/js/Sinks/CFSCOPE.js index 22d2d014..47eb51d8 100644 --- a/js/Sinks/CFSCOPE.js +++ b/js/Sinks/CFSCOPE.js @@ -39,19 +39,19 @@ function CFSCOPE() { return options; } CFSCOPE.prototype.set = function CFSCOPE() { - this.clrs = inverse(arguments[0]["clrs"]) - this.win = parseFloat(arguments[0]["win"]) - this.wpos = inverse(arguments[0]["wpos"]) - this.wdim = inverse(arguments[0]["wdim"]) - this.ymin = parseFloat(arguments[0]["ymin"]) - this.ymax = parseFloat(arguments[0]["ymax"]) - this.per = parseFloat(arguments[0]["per"]) - this.N = parseFloat(arguments[0]["N"]) - this.wu = arguments[0]["wu"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.wu,this.exprs] = scicos_getvalue("Set Scope parameters",["Color (>0) or mark (<0) vector (8 entries)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin","Ymax","Refresh period","Buffer size","Links to view"],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",-1),this.exprs); + var ok = true; + this.clrs = inverse(arguments[0]["clrs"]); + this.win = parseFloat(arguments[0]["win"]); + this.wpos = inverse(arguments[0]["wpos"]); + this.wdim = inverse(arguments[0]["wdim"]); + this.ymin = parseFloat(arguments[0]["ymin"]); + this.ymax = parseFloat(arguments[0]["ymax"]); + this.per = parseFloat(arguments[0]["per"]); + this.N = parseFloat(arguments[0]["N"]); + this.wu = arguments[0]["wu"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CLKOUTV_f.js b/js/Sinks/CLKOUTV_f.js index 9ec8b81b..a839c290 100644 --- a/js/Sinks/CLKOUTV_f.js +++ b/js/Sinks/CLKOUTV_f.js @@ -22,11 +22,11 @@ function CLKOUTV_f() { return options; } CLKOUTV_f.prototype.set = function CLKOUTV_f() { - this.prt = arguments[0]["prt"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.prt,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKOUTV_f")],[" "],["Event output port"]],"Port number",list("vec",1),this.exprs); + var ok = true; + this.prt = arguments[0]["prt"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CLKOUT_f.js b/js/Sinks/CLKOUT_f.js index 5927fb95..2bf0edfe 100644 --- a/js/Sinks/CLKOUT_f.js +++ b/js/Sinks/CLKOUT_f.js @@ -22,12 +22,12 @@ function CLKOUT_f() { return options; } CLKOUT_f.prototype.set = function CLKOUT_f() { - this.prt = parseFloat(arguments[0]["prt"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; this.exprs = this.exprs[1-1]; while (true) { - [ok,this.prt,this.exprs] = scicos_getvalue("Set Event Output block parameters","Port number",list("vec",1),this.exprs); + var ok = true; + this.prt = parseFloat(arguments[0]["prt"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Sinks/CMAT3D.js b/js/Sinks/CMAT3D.js index 0ae33284..0d510d02 100644 --- a/js/Sinks/CMAT3D.js +++ b/js/Sinks/CMAT3D.js @@ -38,15 +38,15 @@ function CMAT3D() { return options; } CMAT3D.prototype.set = function CMAT3D() { - this.vec_x = arguments[0]["vec_x"] - this.vec_y = arguments[0]["vec_y"] - this.colormap = parseFloat(arguments[0]["colormap"]) - this.cmin = parseFloat(arguments[0]["cmin"]) - this.cmax = parseFloat(arguments[0]["cmax"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.vec_x,this.vec_y,this.colormap,this.cmin,this.cmax,this.exprs] = scicos_getvalue("Set Scope parameters",["Bounds Vector X (-1 for standard)","Bounds Vector Y (-1 for standard)","ColorMap","Zmin","Zmax"],list("vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.vec_x = arguments[0]["vec_x"]; + this.vec_y = arguments[0]["vec_y"]; + this.colormap = parseFloat(arguments[0]["colormap"]); + this.cmin = parseFloat(arguments[0]["cmin"]); + this.cmax = parseFloat(arguments[0]["cmax"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CMATVIEW.js b/js/Sinks/CMATVIEW.js index c4c1736f..0fc1f9a8 100644 --- a/js/Sinks/CMATVIEW.js +++ b/js/Sinks/CMATVIEW.js @@ -34,13 +34,13 @@ function CMATVIEW() { return options; } CMATVIEW.prototype.set = function CMATVIEW() { - this.colormap = parseFloat(arguments[0]["colormap"]) - this.cmin = parseFloat(arguments[0]["cmin"]) - this.cmax = parseFloat(arguments[0]["cmax"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.colormap,this.cmin,this.cmax,this.exprs] = scicos_getvalue("Set Scope parameters",["ColorMap","Minimum level range","Maximum level range"],list("vec",-1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.colormap = parseFloat(arguments[0]["colormap"]); + this.cmin = parseFloat(arguments[0]["cmin"]); + this.cmax = parseFloat(arguments[0]["cmax"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CMSCOPE.js b/js/Sinks/CMSCOPE.js index 69787569..62d1c21b 100644 --- a/js/Sinks/CMSCOPE.js +++ b/js/Sinks/CMSCOPE.js @@ -47,21 +47,21 @@ function CMSCOPE() { return options; } CMSCOPE.prototype.set = function CMSCOPE() { - this.in1 = inverse(arguments[0]["in1"]) - this.clrs = inverse(arguments[0]["clrs"]) - this.win = parseFloat(arguments[0]["win"]) - this.wpos = inverse(arguments[0]["wpos"]) - this.wdim = inverse(arguments[0]["wdim"]) - this.ymin = inverse(arguments[0]["ymin"]) - this.ymax = inverse(arguments[0]["ymax"]) - this.per = inverse(arguments[0]["per"]) - this.N = parseFloat(arguments[0]["N"]) - this.heritance = arguments[0]["heritance"] - this.nom = arguments[0]["nom"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.in1,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,this.exprs] = scicos_getvalue("Set Scope parameters",["Input ports sizes","Drawing colors (>0) or mark (<0)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin vector","Ymax vector","Refresh period","Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"],list("vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec",1,"vec",1,"str",1),this.exprs); + var ok = true; + this.in1 = inverse(arguments[0]["in1"]); + this.clrs = inverse(arguments[0]["clrs"]); + this.win = parseFloat(arguments[0]["win"]); + this.wpos = inverse(arguments[0]["wpos"]); + this.wdim = inverse(arguments[0]["wdim"]); + this.ymin = inverse(arguments[0]["ymin"]); + this.ymax = inverse(arguments[0]["ymax"]); + this.per = inverse(arguments[0]["per"]); + this.N = parseFloat(arguments[0]["N"]); + this.heritance = arguments[0]["heritance"]; + this.nom = arguments[0]["nom"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CSCOPE.js b/js/Sinks/CSCOPE.js index 0fcf3788..712574e7 100644 --- a/js/Sinks/CSCOPE.js +++ b/js/Sinks/CSCOPE.js @@ -42,20 +42,20 @@ function CSCOPE() { return options; } CSCOPE.prototype.set = function CSCOPE() { - this.clrs = inverse(arguments[0]["clrs"]) - this.win = parseFloat(arguments[0]["win"]) - this.wpos = inverse(arguments[0]["wpos"]) - this.wdim = inverse(arguments[0]["wdim"]) - this.ymin = parseFloat(arguments[0]["ymin"]) - this.ymax = parseFloat(arguments[0]["ymax"]) - this.per = parseFloat(arguments[0]["per"]) - this.N = parseFloat(arguments[0]["N"]) - this.heritance = arguments[0]["heritance"] - this.nom = arguments[0]["nom"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,this.exprs] = scicos_getvalue("Set Scope parameters",["Color (>0) or mark (<0) vector (8 entries)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin","Ymax","Refresh period","Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"str",1),this.exprs); + var ok = true; + this.clrs = inverse(arguments[0]["clrs"]); + this.win = parseFloat(arguments[0]["win"]); + this.wpos = inverse(arguments[0]["wpos"]); + this.wdim = inverse(arguments[0]["wdim"]); + this.ymin = parseFloat(arguments[0]["ymin"]); + this.ymax = parseFloat(arguments[0]["ymax"]); + this.per = parseFloat(arguments[0]["per"]); + this.N = parseFloat(arguments[0]["N"]); + this.heritance = arguments[0]["heritance"]; + this.nom = arguments[0]["nom"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CSCOPXY.js b/js/Sinks/CSCOPXY.js index 596baa67..299e9f78 100644 --- a/js/Sinks/CSCOPXY.js +++ b/js/Sinks/CSCOPXY.js @@ -47,21 +47,21 @@ function CSCOPXY() { return options; } CSCOPXY.prototype.set = function CSCOPXY() { - this.nbr_curves = parseFloat(arguments[0]["nbr_curves"]) - this.clrs = parseFloat(arguments[0]["clrs"]) - this.siz = parseFloat(arguments[0]["siz"]) - this.win = parseFloat(arguments[0]["win"]) - this.wpos = inverse(arguments[0]["wpos"]) - this.wdim = inverse(arguments[0]["wdim"]) - this.xmin = parseFloat(arguments[0]["xmin"]) - this.xmax = parseFloat(arguments[0]["xmax"]) - this.ymin = parseFloat(arguments[0]["ymin"]) - this.ymax = parseFloat(arguments[0]["ymax"]) - this.N = parseFloat(arguments[0]["N"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,this.exprs] = scicos_getvalue("Set Scope parameters",["Number of Curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin","Xmax","Ymin","Ymax","Buffer size"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.nbr_curves = parseFloat(arguments[0]["nbr_curves"]); + this.clrs = parseFloat(arguments[0]["clrs"]); + this.siz = parseFloat(arguments[0]["siz"]); + this.win = parseFloat(arguments[0]["win"]); + this.wpos = inverse(arguments[0]["wpos"]); + this.wdim = inverse(arguments[0]["wdim"]); + this.xmin = parseFloat(arguments[0]["xmin"]); + this.xmax = parseFloat(arguments[0]["xmax"]); + this.ymin = parseFloat(arguments[0]["ymin"]); + this.ymax = parseFloat(arguments[0]["ymax"]); + this.N = parseFloat(arguments[0]["N"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/CSCOPXY3D.js b/js/Sinks/CSCOPXY3D.js index dbbbbbac..59045636 100644 --- a/js/Sinks/CSCOPXY3D.js +++ b/js/Sinks/CSCOPXY3D.js @@ -47,21 +47,21 @@ function CSCOPXY3D() { return options; } CSCOPXY3D.prototype.set = function CSCOPXY3D() { - this.nbr_curves = parseFloat(arguments[0]["nbr_curves"]) - this.clrs = inverse(arguments[0]["clrs"]) - this.siz = inverse(arguments[0]["siz"]) - this.win = parseFloat(arguments[0]["win"]) - this.wpos = inverse(arguments[0]["wpos"]) - this.wdim = inverse(arguments[0]["wdim"]) - this.vec_x = inverse(arguments[0]["vec_x"]) - this.vec_y = inverse(arguments[0]["vec_y"]) - this.vec_z = inverse(arguments[0]["vec_z"]) - this.param3ds = inverse(arguments[0]["param3ds"]) - this.N = parseFloat(arguments[0]["N"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,this.exprs] = scicos_getvalue("Set Scope parameters",["Number of curves","color (>0) or mark (<0)","Line or Mark Size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin and Xmax","Ymin and Ymax","Zmin and Zmax","Alpha and Theta","Buffer size"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",2,"vec",2,"vec",2,"vec",2,"vec",1),this.exprs); + var ok = true; + this.nbr_curves = parseFloat(arguments[0]["nbr_curves"]); + this.clrs = inverse(arguments[0]["clrs"]); + this.siz = inverse(arguments[0]["siz"]); + this.win = parseFloat(arguments[0]["win"]); + this.wpos = inverse(arguments[0]["wpos"]); + this.wdim = inverse(arguments[0]["wdim"]); + this.vec_x = inverse(arguments[0]["vec_x"]); + this.vec_y = inverse(arguments[0]["vec_y"]); + this.vec_z = inverse(arguments[0]["vec_z"]); + this.param3ds = inverse(arguments[0]["param3ds"]); + this.N = parseFloat(arguments[0]["N"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/OUTIMPL_f.js b/js/Sinks/OUTIMPL_f.js index e60d5341..b8141bbc 100644 --- a/js/Sinks/OUTIMPL_f.js +++ b/js/Sinks/OUTIMPL_f.js @@ -28,14 +28,14 @@ function OUTIMPL_f() { return options; } OUTIMPL_f.prototype.set = function OUTIMPL_f() { - this.prt = parseFloat(arguments[0]["prt"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[1-1]; } while (true) { - [ok,this.prt,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","OUTIMPL_f")],[" "],["Implicit output port"]],"Port number",list("vec",1),this.exprs); + var ok = true; + this.prt = parseFloat(arguments[0]["prt"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Sinks/OUT_f.js b/js/Sinks/OUT_f.js index 93a0c6d9..0089c599 100644 --- a/js/Sinks/OUT_f.js +++ b/js/Sinks/OUT_f.js @@ -25,14 +25,14 @@ function OUT_f() { return options; } OUT_f.prototype.set = function OUT_f() { - this.prt = parseFloat(arguments[0]["prt"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[1-1]; } while (true) { - [ok,this.prt,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","OUT_f")],[" "],["Regular output port"]],"Port number",list("vec",1),this.exprs); + var ok = true; + this.prt = parseFloat(arguments[0]["prt"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Sinks/TOWS_c.js b/js/Sinks/TOWS_c.js index 2348f814..31e556fc 100644 --- a/js/Sinks/TOWS_c.js +++ b/js/Sinks/TOWS_c.js @@ -35,13 +35,13 @@ function TOWS_c() { return options; } TOWS_c.prototype.set = function TOWS_c() { - this.nz = parseFloat(arguments[0]["nz"]) - this.varnam = arguments[0]["varnam"] - this.herit = parseFloat(arguments[0]["herit"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.nz,this.varnam,this.herit,this.exprs] = scicos_getvalue("Set Xcos buffer block",["Size of buffer","Scilab variable name","Inherit (no:0, yes:1)"],list("vec",1,"str",1,"vec",1),this.exprs); + var ok = true; + this.nz = parseFloat(arguments[0]["nz"]); + this.varnam = arguments[0]["varnam"]; + this.herit = parseFloat(arguments[0]["herit"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/WFILE_f.js b/js/Sinks/WFILE_f.js index f622f917..75f55479 100644 --- a/js/Sinks/WFILE_f.js +++ b/js/Sinks/WFILE_f.js @@ -33,11 +33,6 @@ function WFILE_f() { return options; } WFILE_f.prototype.set = function WFILE_f() { - this.in1 = parseFloat(arguments[0]["in1"]) - this.fname1 = parseFloat(arguments[0]["fname1"]) - this.frmt1 = parseFloat(arguments[0]["frmt1"]) - this.N = parseFloat(arguments[0]["N"]) - this.exprs = arguments[0]["exprs"] warnobsolete("WRITEC_f","6.0.0"); var warnMessage = msprintf(_("Feature %s is obsolete."),"WFILE_f"); var warnAdvise = msprintf(_("Please use %s instead."),"WRITEC_f"); @@ -48,7 +43,12 @@ function WFILE_f() { var fname = this.exprs[2-1]; var frmt = this.exprs[3-1]; while (true) { - [ok,this.in1,this.fname1,this.frmt1,this.N,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WFILE_f")],[" "],["Write to output file"],[" "],["Write is done on:"],[" - A binary file if no format given"],[" - A formatted text file if a format (Fortran type) is given"]],["Input Size","Output File Name","Output Format","Buffer Size"],list("vec",1,"str",1,"str",1,"vec",1),this.exprs); + var ok = true; + this.in1 = parseFloat(arguments[0]["in1"]); + this.fname1 = parseFloat(arguments[0]["fname1"]); + this.frmt1 = parseFloat(arguments[0]["frmt1"]); + this.N = parseFloat(arguments[0]["N"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/WRITEAU_f.js b/js/Sinks/WRITEAU_f.js index b72e0e93..74f2432d 100644 --- a/js/Sinks/WRITEAU_f.js +++ b/js/Sinks/WRITEAU_f.js @@ -32,15 +32,15 @@ function WRITEAU_f() { return options; } WRITEAU_f.prototype.set = function WRITEAU_f() { - this.N = parseFloat(arguments[0]["N"]) - this.swap = parseFloat(arguments[0]["swap"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ipar = this.model.ipar; var dstate = this.model.dstate; var lunit = dstate[2-1]; while (true) { - [ok,this.N,this.swap,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WRITEAU_f")],[" "],["Write \'.au\' sound file on audio device"]],["Buffer Size","Swap Mode (0:No, 1:Yes)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.N = parseFloat(arguments[0]["N"]); + this.swap = parseFloat(arguments[0]["swap"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js index 2419c66e..abfb1c69 100644 --- a/js/Sinks/WRITEC_f.js +++ b/js/Sinks/WRITEC_f.js @@ -35,12 +35,6 @@ function WRITEC_f() { return options; } WRITEC_f.prototype.set = function WRITEC_f() { - this.in1 = parseFloat(arguments[0]["in1"]) - this.fname1 = parseFloat(arguments[0]["fname1"]) - this.frmt1 = arguments[0]["frmt1"] - this.N = parseFloat(arguments[0]["N"]) - this.swap = parseFloat(arguments[0]["swap"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ipar = this.model.ipar; var dstate = this.model.dstate; @@ -48,7 +42,13 @@ function WRITEC_f() { var fname = this.exprs[2-1]; var frmt = this.exprs[3-1]; while (true) { - [ok,this.in1,this.fname1,this.frmt1,this.N,this.swap,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WRITEC_f")],[" "],["Write to C binary file"]],["Input Size","Output File Name","Output Format","Buffer Size","Swap Mode (0:No, 1:Yes)"],list("vec",1,"str",1,"str",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.in1 = parseFloat(arguments[0]["in1"]); + this.fname1 = parseFloat(arguments[0]["fname1"]); + this.frmt1 = arguments[0]["frmt1"]; + this.N = parseFloat(arguments[0]["N"]); + this.swap = parseFloat(arguments[0]["swap"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js index 140623c7..c694928c 100644 --- a/js/Sources/CLKINV_f.js +++ b/js/Sources/CLKINV_f.js @@ -23,12 +23,12 @@ function CLKINV_f() { return options; } CLKINV_f.prototype.set = function CLKINV_f() { - this.prt = parseFloat(arguments[0]["prt"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; this.exprs = this.exprs[1-1]; while (true) { - [ok,this.prt,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKINV_f")],[" "],["Event input port"],[" "]],"Port Number",list("vec",1),this.exprs); + var ok = true; + this.prt = parseFloat(arguments[0]["prt"]); + this.exprs = parseFloat(arguments[0]["exprs"]); this.prt = int(this.prt); if (!ok) { break; diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js index 73cd143c..96057474 100644 --- a/js/Sources/CLKIN_f.js +++ b/js/Sources/CLKIN_f.js @@ -22,12 +22,12 @@ function CLKIN_f() { return options; } CLKIN_f.prototype.set = function CLKIN_f() { - this.prt = parseFloat(arguments[0]["prt"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; this.exprs = this.exprs[1-1]; while (true) { - [ok,this.prt,this.exprs] = scicos_getvalue("Set Event Input block parameters","Port number",list("vec",1),this.exprs); + var ok = true; + this.prt = parseFloat(arguments[0]["prt"]); + this.exprs = parseFloat(arguments[0]["exprs"]); this.prt = int(this.prt); if (!ok) { break; diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js index a967cc83..1b458be2 100644 --- a/js/Sources/CLOCK_c.js +++ b/js/Sources/CLOCK_c.js @@ -53,9 +53,6 @@ function CLOCK_c() { return options; } CLOCK_c.prototype.set = function CLOCK_c() { - this.dt = arguments[0]["dt"] - this.t0 = arguments[0]["t0"] - this.exprs0 = arguments[0]["exprs0"] if (typeof(o)=="Block"&&o.gui=="EVTDLY_c") { var path = i; break; @@ -68,7 +65,10 @@ function CLOCK_c() { var dt_old = this.model.rpar[1-1]; var model_n = this.model; while (true) { - [ok,this.dt,this.t0,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","CLOCK_c")],[" "],["Event clock generator"],[" "],[" Do not start if \'Initialisation Time\' is negative"],[" "]],["Period","Initialisation Time"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.dt = arguments[0]["dt"]; + this.t0 = arguments[0]["t0"]; + this.exprs0 = arguments[0]["exprs0"]; if (!ok) { break; } diff --git a/js/Sources/CLOCK_f.js b/js/Sources/CLOCK_f.js index 3fb2bb94..3ebc7d0c 100644 --- a/js/Sources/CLOCK_f.js +++ b/js/Sources/CLOCK_f.js @@ -53,9 +53,6 @@ function CLOCK_f() { return options; } CLOCK_f.prototype.set = function CLOCK_f() { - this.dt = arguments[0]["dt"] - this.t0 = arguments[0]["t0"] - this.exprs0 = arguments[0]["exprs0"] if (typeof(o)=="Block"&&o.gui=="EVTDLY_f") { var path = i; break; @@ -68,7 +65,10 @@ function CLOCK_f() { var dt_old = this.model.rpar; var model_n = this.model; while (true) { - [ok,this.dt,this.t0,this.exprs0] = scicos_getvalue("Set Clock block parameters",["Period","Init time"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.dt = arguments[0]["dt"]; + this.t0 = arguments[0]["t0"]; + this.exprs0 = arguments[0]["exprs0"]; if (!ok) { break; } diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js index c48814a6..76661388 100644 --- a/js/Sources/CONST.js +++ b/js/Sources/CONST.js @@ -23,11 +23,11 @@ function CONST() { return options; } CONST.prototype.set = function CONST() { - this.C = parseFloat(arguments[0]["C"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.C,this.exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),this.exprs); + var ok = true; + this.C = parseFloat(arguments[0]["C"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js index 22b503c3..c866e463 100644 --- a/js/Sources/CONST_f.js +++ b/js/Sources/CONST_f.js @@ -23,11 +23,11 @@ function CONST_f() { return options; } CONST_f.prototype.set = function CONST_f() { - this.C = parseFloat(arguments[0]["C"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.C,this.exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),this.exprs); + var ok = true; + this.C = parseFloat(arguments[0]["C"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js index 7996dfc3..55c8e3a6 100644 --- a/js/Sources/CONST_m.js +++ b/js/Sources/CONST_m.js @@ -26,11 +26,11 @@ function CONST_m() { return options; } CONST_m.prototype.set = function CONST_m() { - this.C = inverse(arguments[0]["C"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.C,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONST_m")],[" "],["Constant value generator"],[" "]],"Constant Value",list("vec",-1),this.exprs); + var ok = true; + this.C = inverse(arguments[0]["C"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/CURVE_c.js b/js/Sources/CURVE_c.js index 4e040c1c..c80502c7 100644 --- a/js/Sources/CURVE_c.js +++ b/js/Sources/CURVE_c.js @@ -37,18 +37,18 @@ function CURVE_c() { return options; } CURVE_c.prototype.set = function CURVE_c() { - this.Method = parseFloat(arguments[0]["Method"]) - this.xx = inverse(arguments[0]["xx"]) - this.yy = inverse(arguments[0]["yy"]) - this.PeriodicOption = arguments[0]["PeriodicOption"] - this.graf = arguments[0]["graf"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var ok = false; var SaveExit = false; while (true) { var Ask_again = false; - [ok,this.Method,this.xx,this.yy,this.PeriodicOption,this.graf,this.exprs] = scicos_getvalue("Spline data",["Spline Method (0..7)","x","y","Periodic signal(y/n)?","Launch graphic window(y/n)?"],list("vec",1,"vec",-1,"vec",-1,"str",1,"str",1),this.exprs); + var ok = true; + this.Method = parseFloat(arguments[0]["Method"]); + this.xx = inverse(arguments[0]["xx"]); + this.yy = inverse(arguments[0]["yy"]); + this.PeriodicOption = arguments[0]["PeriodicOption"]; + this.graf = arguments[0]["graf"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/Counter.js b/js/Sources/Counter.js index 79fbc87a..3c58ad05 100644 --- a/js/Sources/Counter.js +++ b/js/Sources/Counter.js @@ -30,13 +30,13 @@ function Counter() { return options; } Counter.prototype.set = function Counter() { - this.minim = parseFloat(arguments[0]["minim"]) - this.maxim = parseFloat(arguments[0]["maxim"]) - this.rule = parseFloat(arguments[0]["rule"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.minim,this.maxim,this.rule,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Counter")],[" "],["Integer counter generator"],[" "]],["Minimum","Maximum","Rule (1:Increment, 2:Decrement)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.minim = parseFloat(arguments[0]["minim"]); + this.maxim = parseFloat(arguments[0]["maxim"]); + this.rule = parseFloat(arguments[0]["rule"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js index 714ff8fe..4adfef56 100644 --- a/js/Sources/FROMWS_c.js +++ b/js/Sources/FROMWS_c.js @@ -34,14 +34,14 @@ function FROMWS_c() { return options; } FROMWS_c.prototype.set = function FROMWS_c() { - this.varnam = arguments[0]["varnam"] - this.Method = parseFloat(arguments[0]["Method"]) - this.ZC = parseFloat(arguments[0]["ZC"]) - this.OutEnd = parseFloat(arguments[0]["OutEnd"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.varnam,this.Method,this.ZC,this.OutEnd,this.exprs] = scicos_getvalue("Set From_Workspace block parameters",["Variable name","Interpolation Method","Enable zero crossing(0:No, 1:Yes)?","Output at end(0:Zero, 1:Hold, 2:Repeat)"],list("str",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.varnam = arguments[0]["varnam"]; + this.Method = parseFloat(arguments[0]["Method"]); + this.ZC = parseFloat(arguments[0]["ZC"]); + this.OutEnd = parseFloat(arguments[0]["OutEnd"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js index b141b1a7..6d3b1e7c 100644 --- a/js/Sources/GENSIN_f.js +++ b/js/Sources/GENSIN_f.js @@ -28,13 +28,13 @@ function GENSIN_f() { return options; } GENSIN_f.prototype.set = function GENSIN_f() { - this.M = arguments[0]["M"] - this.F = arguments[0]["F"] - this.P = arguments[0]["P"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.M,this.F,this.P,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","GENSIN_f")],[" "],["Sine wave generator"],[" "]],["Magnitude","Frequency (rad/s)","Phase (rad)"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.M = arguments[0]["M"]; + this.F = arguments[0]["F"]; + this.P = arguments[0]["P"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/GENSQR_f.js b/js/Sources/GENSQR_f.js index 7c09ea48..874e820d 100644 --- a/js/Sources/GENSQR_f.js +++ b/js/Sources/GENSQR_f.js @@ -26,14 +26,14 @@ function GENSQR_f() { return options; } GENSQR_f.prototype.set = function GENSQR_f() { - this.Amplitude = parseFloat(arguments[0]["Amplitude"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[2-1]; } while (true) { - [ok,this.Amplitude,this.exprs] = scicos_getvalue(["Set Square generator block parameters"],["Amplitude"],list("vec",1),this.exprs); + var ok = true; + this.Amplitude = parseFloat(arguments[0]["Amplitude"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js index acd68578..03aac3aa 100644 --- a/js/Sources/GEN_SQR.js +++ b/js/Sources/GEN_SQR.js @@ -59,11 +59,6 @@ function GEN_SQR() { return options; } GEN_SQR.prototype.set = function GEN_SQR() { - scicos_context.Amin = arguments[0]["scicos_context.Amin"] - scicos_context.Amax = arguments[0]["scicos_context.Amax"] - scicos_context.rule = arguments[0]["scicos_context.rule"] - scicos_context.F = arguments[0]["scicos_context.F"] - this.exprs = arguments[0]["exprs"] var y = this.needcompile; var typ = list(); this.exprs = this.graphics.exprs; @@ -74,7 +69,12 @@ function GEN_SQR() { var scicos_context = struct(); var ok = false; while (!ok) { - [ok,scicos_context.Amin,scicos_context.Amax,scicos_context.rule,scicos_context.F,this.exprs] = scicos_getvalue(Btitre,Bitems,Ss,this.exprs); + var ok = true; + scicos_context.Amin = arguments[0]["scicos_context.Amin"]; + scicos_context.Amax = arguments[0]["scicos_context.Amax"]; + scicos_context.rule = arguments[0]["scicos_context.rule"]; + scicos_context.F = arguments[0]["scicos_context.F"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { return; } diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js index 91304a4c..548f42d6 100644 --- a/js/Sources/INIMPL_f.js +++ b/js/Sources/INIMPL_f.js @@ -28,14 +28,14 @@ function INIMPL_f() { return options; } INIMPL_f.prototype.set = function INIMPL_f() { - this.prt = parseFloat(arguments[0]["prt"]) - this.exprs = parseFloat(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==2) { this.exprs = this.exprs[1-1]; } while (true) { - [ok,this.prt,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INIMPL_f")],[" "],["Implicit input port"],[" "]],"Port Number",list("vec",1),this.exprs); + var ok = true; + this.prt = parseFloat(arguments[0]["prt"]); + this.exprs = parseFloat(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Sources/Modulo_Count.js b/js/Sources/Modulo_Count.js index d3d8fc63..3e7bc4db 100644 --- a/js/Sources/Modulo_Count.js +++ b/js/Sources/Modulo_Count.js @@ -27,12 +27,12 @@ function Modulo_Count() { return options; } Modulo_Count.prototype.set = function Modulo_Count() { - this.ini_c = parseFloat(arguments[0]["ini_c"]) - this.base = parseFloat(arguments[0]["base"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.ini_c,this.base,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Modulo_Count")],[" "],["Modulo counter (0 to N counter)"],[" "]],["Initial State (zero or positive number)","Upper Limit (positive number)"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.ini_c = parseFloat(arguments[0]["ini_c"]); + this.base = parseFloat(arguments[0]["base"]); + this.exprs = arguments[0]["exprs"]; this.ini_c = int(this.ini_c); this.base = int(this.base); if (!ok) { diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js index 6ec87ef7..6b91077a 100644 --- a/js/Sources/PULSE_SC.js +++ b/js/Sources/PULSE_SC.js @@ -54,11 +54,6 @@ function PULSE_SC() { return options; } PULSE_SC.prototype.set = function PULSE_SC() { - scicos_context.E = arguments[0]["scicos_context.E"] - scicos_context.W = arguments[0]["scicos_context.W"] - scicos_context.F = arguments[0]["scicos_context.F"] - scicos_context.A = arguments[0]["scicos_context.A"] - this.exprs = arguments[0]["exprs"] var y = this.needcompile; var typ = list(); this.exprs = this.graphics.exprs; @@ -69,7 +64,12 @@ function PULSE_SC() { var scicos_context = struct(); var ok = false; while (!ok) { - [ok,scicos_context.E,scicos_context.W,scicos_context.F,scicos_context.A,this.exprs] = scicos_getvalue(Btitre,Bitems,Ss,this.exprs); + var ok = true; + scicos_context.E = arguments[0]["scicos_context.E"]; + scicos_context.W = arguments[0]["scicos_context.W"]; + scicos_context.F = arguments[0]["scicos_context.F"]; + scicos_context.A = arguments[0]["scicos_context.A"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { return; } diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js index 4e351fee..a18024eb 100644 --- a/js/Sources/RAMP.js +++ b/js/Sources/RAMP.js @@ -31,13 +31,13 @@ function RAMP() { return options; } RAMP.prototype.set = function RAMP() { - this.slope = parseFloat(arguments[0]["slope"]) - this.stt = parseFloat(arguments[0]["stt"]) - this.iout = parseFloat(arguments[0]["iout"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.slope,this.stt,this.iout,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","RAMP")],[" "],["Ramp function"],[" "]],["Slope","Start Time","Initial Value"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.slope = parseFloat(arguments[0]["slope"]); + this.stt = parseFloat(arguments[0]["stt"]); + this.iout = parseFloat(arguments[0]["iout"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/RAND_f.js b/js/Sources/RAND_f.js index 0cdd5b9c..d38311f7 100644 --- a/js/Sources/RAND_f.js +++ b/js/Sources/RAND_f.js @@ -33,11 +33,6 @@ function RAND_f() { return options; } RAND_f.prototype.set = function RAND_f() { - this.flag = parseFloat(arguments[0]["flag"]) - this.a = parseFloat(arguments[0]["a"]) - this.b = parseFloat(arguments[0]["b"]) - this.seed_c = arguments[0]["seed_c"] - this.exprs = inverse(arguments[0]["exprs"]) this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==5) { this.exprs = this.exprs.slice(1-1,3); @@ -46,7 +41,12 @@ function RAND_f() { this.exprs = [[this.exprs],[string(this.model.dstate[1-1])]]; } while (true) { - [ok,this.flag,this.a,this.b,this.seed_c,this.exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be vector with equal sizes"],["seed is the seed of random number generator (integer<2**31)"]],["flag","A","B","seed"],list("vec",1,"vec",-1,"vec","size(%2,\'*\')","vec",1),this.exprs); + var ok = true; + this.flag = parseFloat(arguments[0]["flag"]); + this.a = parseFloat(arguments[0]["a"]); + this.b = parseFloat(arguments[0]["b"]); + this.seed_c = arguments[0]["seed_c"]; + this.exprs = inverse(arguments[0]["exprs"]); if (!ok) { break; } diff --git a/js/Sources/RAND_m.js b/js/Sources/RAND_m.js index f5753151..0e1fdf00 100644 --- a/js/Sources/RAND_m.js +++ b/js/Sources/RAND_m.js @@ -43,18 +43,18 @@ function RAND_m() { return options; } RAND_m.prototype.set = function RAND_m() { - this.typ = inverse(arguments[0]["typ"]) - this.flag = parseFloat(arguments[0]["flag"]) - this.a = parseFloat(arguments[0]["a"]) - this.b = parseFloat(arguments[0]["b"]) - this.seed_c = arguments[0]["seed_c"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; if (size(this.exprs,"*")==14) { this.exprs[9-1] = []; } while (true) { - [ok,this.typ,this.flag,this.a,this.b,this.seed_c,this.exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be matrix with equal sizes"]],["Datatype(1=real double 2=complex)","flag","A","B","SEED"],list("vec",1,"vec",1,"mat",[-1,-2],"mat","[-1 -2]","mat",[1,2]),this.exprs); + var ok = true; + this.typ = inverse(arguments[0]["typ"]); + this.flag = parseFloat(arguments[0]["flag"]); + this.a = parseFloat(arguments[0]["a"]); + this.b = parseFloat(arguments[0]["b"]); + this.seed_c = arguments[0]["seed_c"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js index 1d6748b9..0fafedda 100644 --- a/js/Sources/READAU_f.js +++ b/js/Sources/READAU_f.js @@ -37,10 +37,6 @@ function READAU_f() { return options; } READAU_f.prototype.set = function READAU_f() { - this.fname1 = parseFloat(arguments[0]["fname1"]) - this.N = parseFloat(arguments[0]["N"]) - this.swap = parseFloat(arguments[0]["swap"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var out = this.model.out; var dstate = this.model.dstate; @@ -50,7 +46,11 @@ function READAU_f() { var lunit = dstate[3-1]; var fname = this.exprs[1-1]; while (true) { - [ok,this.fname1,this.N,this.swap,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","READAU_f")],[" "],["(Read Audio File)"],[" "],["Read is done on a binary \'.au\' file"]],["Input File Name","Buffer size","Swap Mode (0:No, 1:Yes)"],list("str",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.fname1 = parseFloat(arguments[0]["fname1"]); + this.N = parseFloat(arguments[0]["N"]); + this.swap = parseFloat(arguments[0]["swap"]); + this.exprs = arguments[0]["exprs"]; var tmask1 = []; var outmask = 1; var frmt1 = "uc"; diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js index a52a4711..7077cef6 100644 --- a/js/Sources/READC_f.js +++ b/js/Sources/READC_f.js @@ -46,15 +46,6 @@ function READC_f() { return options; } READC_f.prototype.set = function READC_f() { - this.tmask1 = parseFloat(arguments[0]["tmask1"]) - this.outmask = parseFloat(arguments[0]["outmask"]) - this.fname1 = parseFloat(arguments[0]["fname1"]) - this.frmt1 = arguments[0]["frmt1"] - this.M = parseFloat(arguments[0]["M"]) - this.N = parseFloat(arguments[0]["N"]) - this.offset = parseFloat(arguments[0]["offset"]) - this.swap = parseFloat(arguments[0]["swap"]) - this.exprs = arguments[0]["exprs"] this.model = this.x.model; this.exprs = this.graphics.exprs; var out = this.model.out; @@ -66,7 +57,16 @@ function READC_f() { var fname = this.exprs[3-1]; var frmt = this.exprs[4-1]; while (true) { - [ok,this.tmask1,this.outmask,this.fname1,this.frmt1,this.M,this.N,this.offset,this.swap,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","READC_f")],[" "],["Read from C binary file"]],["Time Record Selection","Outputs Record Selection","Input File Name","Input Format","Record Size","Buffer Size","Initial Record Index","Swap Mode (0:No, 1:Yes)"],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1,"vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.tmask1 = parseFloat(arguments[0]["tmask1"]); + this.outmask = parseFloat(arguments[0]["outmask"]); + this.fname1 = parseFloat(arguments[0]["fname1"]); + this.frmt1 = arguments[0]["frmt1"]; + this.M = parseFloat(arguments[0]["M"]); + this.N = parseFloat(arguments[0]["N"]); + this.offset = parseFloat(arguments[0]["offset"]); + this.swap = parseFloat(arguments[0]["swap"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js index a05b52ed..f2c02647 100644 --- a/js/Sources/RFILE_f.js +++ b/js/Sources/RFILE_f.js @@ -39,12 +39,6 @@ function RFILE_f() { return options; } RFILE_f.prototype.set = function RFILE_f() { - this.tmask1 = parseFloat(arguments[0]["tmask1"]) - this.outmask = parseFloat(arguments[0]["outmask"]) - this.fname1 = parseFloat(arguments[0]["fname1"]) - this.frmt1 = parseFloat(arguments[0]["frmt1"]) - this.N = parseFloat(arguments[0]["N"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var dstate = this.model.dstate; var ipar = this.model.ipar; @@ -59,7 +53,13 @@ function RFILE_f() { this.exprs[6-1] = []; } while (true) { - [ok,this.tmask1,this.outmask,this.fname1,this.frmt1,this.N,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","RFILE_f")],[" "],["Read from an input file"],[" "],["Read is done on:"],[" - A binary file if no format given"],[" - A formatted text file if a format (fortran type) is given"]],["Time Record Selection","Outputs Record Selection","Input File Name","Input Format","Buffer Size"],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1),this.exprs); + var ok = true; + this.tmask1 = parseFloat(arguments[0]["tmask1"]); + this.outmask = parseFloat(arguments[0]["outmask"]); + this.fname1 = parseFloat(arguments[0]["fname1"]); + this.frmt1 = parseFloat(arguments[0]["frmt1"]); + this.N = parseFloat(arguments[0]["N"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js index a5779be2..b743301e 100644 --- a/js/Sources/STEP.js +++ b/js/Sources/STEP.js @@ -30,13 +30,13 @@ function STEP() { return options; } STEP.prototype.set = function STEP() { - this.temps = arguments[0]["temps"] - this.in1 = arguments[0]["in1"] - this.fi = arguments[0]["fi"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.temps,this.in1,this.fi,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","STEP_FUNCTION")],[" "],["Step Function"],[" "]],["Step Time","Initial Value","Final Value"],list("vec",1,"vec",-1,"vec",-1),this.exprs); + var ok = true; + this.temps = arguments[0]["temps"]; + this.in1 = arguments[0]["in1"]; + this.fi = arguments[0]["fi"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/SampleCLK.js b/js/Sources/SampleCLK.js index 55e4663a..eb2a7a81 100644 --- a/js/Sources/SampleCLK.js +++ b/js/Sources/SampleCLK.js @@ -23,12 +23,12 @@ function SampleCLK() { return options; } SampleCLK.prototype.set = function SampleCLK() { - this.frequ = arguments[0]["frequ"] - this.offset = arguments[0]["offset"] - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.frequ,this.offset,this.exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.frequ = arguments[0]["frequ"]; + this.offset = arguments[0]["offset"]; + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js index a487f386..d98b2531 100644 --- a/js/Sources/TKSCALE.js +++ b/js/Sources/TKSCALE.js @@ -28,12 +28,12 @@ function TKSCALE() { return options; } TKSCALE.prototype.set = function TKSCALE() { - this.a = parseFloat(arguments[0]["a"]) - this.b = parseFloat(arguments[0]["b"]) - this.f = parseFloat(arguments[0]["f"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; - [ok,this.a,this.b,this.f,this.exprs] = scicos_getvalue("Set scale block parameters",["Min value","Max value","Normalization"],list("vec",1,"vec",1,"vec",1),this.exprs); + var ok = true; + this.a = parseFloat(arguments[0]["a"]); + this.b = parseFloat(arguments[0]["b"]); + this.f = parseFloat(arguments[0]["f"]); + this.exprs = arguments[0]["exprs"]; if (ok) { this.graphics.exprs = new ScilabDouble([this.exprs]); this.model.rpar = new ScilabDouble([this.a],[this.b],[this.f]); diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js index 155a0e43..be88f52b 100644 --- a/js/Threshold/GENERAL_f.js +++ b/js/Threshold/GENERAL_f.js @@ -29,16 +29,16 @@ function GENERAL_f() { return options; } GENERAL_f.prototype.set = function GENERAL_f() { - this.in1 = parseFloat(arguments[0]["in1"]) - this.out = parseFloat(arguments[0]["out"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; var rpar = this.model.rpar; this.in1 = this.model.in; this.out = this.model.evtout; var nin = sum(this.in1); var nout = sum(this.out); - [ok,this.in1,this.out,this.exprs] = scicos_getvalue("Set General Zero-Crossing parameters",["Input size","Number of event output"],list("vec",1,"vec",1),this.exprs); + var ok = true; + this.in1 = parseFloat(arguments[0]["in1"]); + this.out = parseFloat(arguments[0]["out"]); + this.exprs = arguments[0]["exprs"]; if (ok) { var tmpvar0 = check_io(this.model,this.graphics,this.in1,[],[],ones(this.out,1)); this.model = tmpvar0[0]; diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js index 26d9fba1..cfef4493 100644 --- a/js/Threshold/ZCROSS_f.js +++ b/js/Threshold/ZCROSS_f.js @@ -26,11 +26,11 @@ function ZCROSS_f() { return options; } ZCROSS_f.prototype.set = function ZCROSS_f() { - this.in1 = parseFloat(arguments[0]["in1"]) - this.exprs = arguments[0]["exprs"] this.exprs = this.graphics.exprs; while (true) { - [ok,this.in1,this.exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),this.exprs); + var ok = true; + this.in1 = parseFloat(arguments[0]["in1"]); + this.exprs = arguments[0]["exprs"]; if (!ok) { break; } |