diff options
Diffstat (limited to 'js/Events/IFTHEL_f.js')
-rw-r--r-- | js/Events/IFTHEL_f.js | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/js/Events/IFTHEL_f.js b/js/Events/IFTHEL_f.js index e02dff47..181ba139 100644 --- a/js/Events/IFTHEL_f.js +++ b/js/Events/IFTHEL_f.js @@ -1,58 +1,58 @@ /* autogenerated from "macros/Events/IFTHEL_f.sci" */ function IFTHEL_f() { IFTHEL_f.prototype.define = function IFTHEL_f() { -model=scicos_model(); -model.sim=list("ifthel",-1); -model.in1=1; -model.in2=1; -model.intyp=-1; -model.evtin=1; -model.evtout=[[1],[1]]; -model.blocktype="l"; -model.firing=[-1,-1]; -model.dep_ut=[true,false]; -model.nmode=1; -model.nzcross=1; -gr_i=[]; -exprs=[[string(model.in1)],[string(model.nmode)]]; -x=standard_define([3,3],model,exprs,gr_i); + model = scicos_model(); + model.sim = list("ifthel",-1); + model.in1 = 1; + model.in2 = 1; + model.intyp = -1; + model.evtin = 1; + model.evtout = [[1],[1]]; + model.blocktype = "l"; + model.firing = [-1,-1]; + model.dep_ut = [true,false]; + model.nmode = 1; + model.nzcross = 1; + gr_i = []; + exprs = [[string(model.in1)],[string(model.nmode)]]; + x = standard_define([3,3],model,exprs,gr_i); } IFTHEL_f.prototype.details = function IFTHEL_f() { } IFTHEL_f.prototype.get = function IFTHEL_f() { } IFTHEL_f.prototype.set = function IFTHEL_f() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -if (exprs==[]) { -exprs=string(1); -} -if (size(exprs,"*")==1) { -exprs[2-1]=string(1); -} -while (true) { -[ok,inh,nmod,exprs]=scicos_getvalue("Set parameters",[["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1),exprs); -if (!ok) { + x = arg1; + graphics = arg1.graphics; + exprs = graphics.exprs; + model = arg1.model; + if (exprs==[]) { + exprs = string(1); +} + if (size(exprs,"*")==1) { + exprs[2-1] = string(1); +} + while (true) { + [ok,inh,nmod,exprs] = scicos_getvalue("Set parameters",[["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1),exprs); + if (!ok) { break; } -model.dep_ut=[true,false]; -if (nmod!=0) { -nmod=1; -} -if (inh!=1) { -inh=[]; -} -[model,graphics,ok]=check_io(model,graphics,1,[],inh,[[1],[1]]); -if (ok) { -graphics.exprs=exprs; -model.evtin=inh; -model.sim[2-1]=-1; -model.nmode=nmod; -model.nzcross=nmod; -x.graphics=graphics; -x.model=model; + model.dep_ut = [true,false]; + if (nmod!=0) { + nmod = 1; +} + if (inh!=1) { + inh = []; +} + [model,graphics,ok] = check_io(model,graphics,1,[],inh,[[1],[1]]); + if (ok) { + graphics.exprs = exprs; + model.evtin = inh; + model.sim[2-1] = -1; + model.nmode = nmod; + model.nzcross = nmod; + x.graphics = graphics; + x.model = model; break; } } |