summaryrefslogtreecommitdiff
path: root/js/IntegerOp/JKFLIPFLOP.js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-18 17:08:56 +0530
committerSunil Shetye2018-06-18 17:08:56 +0530
commit0fd33c776a03e3b9ad2267e4f3fbb2c7bcbbb92a (patch)
tree6ae63f7633d80f9a70be43ebe789eb0c3a3ec364 /js/IntegerOp/JKFLIPFLOP.js
parent8e6e9558ba4963ea71b7a6efc11e0b44e7c9040a (diff)
downloadsci2js-0fd33c776a03e3b9ad2267e4f3fbb2c7bcbbb92a.tar.gz
sci2js-0fd33c776a03e3b9ad2267e4f3fbb2c7bcbbb92a.tar.bz2
sci2js-0fd33c776a03e3b9ad2267e4f3fbb2c7bcbbb92a.zip
change order of functions
Diffstat (limited to 'js/IntegerOp/JKFLIPFLOP.js')
-rw-r--r--js/IntegerOp/JKFLIPFLOP.js84
1 files changed, 42 insertions, 42 deletions
diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js
index 311198a0..6e27be91 100644
--- a/js/IntegerOp/JKFLIPFLOP.js
+++ b/js/IntegerOp/JKFLIPFLOP.js
@@ -1,47 +1,5 @@
/* autogenerated from "macros/IntegerOp/JKFLIPFLOP.sci" */
function JKFLIPFLOP() {
-JKFLIPFLOP.prototype.get = function JKFLIPFLOP() {
-}
-JKFLIPFLOP.prototype.set = function JKFLIPFLOP() {
-for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
-o=arg1.model.rpar.objs(i);
-if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") {
-path=i;
-break
-}
-}
-newpar=list();
-xx=arg1.model.rpar.objs(path);
-exprs=xx.graphics.exprs(1);
-model=xx.model;
-init_old=model.odstate(1);
-while (true) {
-[ok,init,exprs0]=scicos_getvalue([msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")," ",gettext("JK flip-flop")," ",gettext("The \'Initial Value\' must be 0 or 1 of type int8"),gettext("&nbsp;- Negative values are considered as int8(0)"),gettext("&nbsp;- Positive values are considered as int8(1)")," "],gettext("Initial Value"),list("vec",1),exprs);
-if (!ok) {
-break
-}
-if (init<=0) {
-init=int8(0);
-} else if (init>0) {
-init=int8(1);
-}
-if (ok) {
-xx.graphics.exprs[1-1]=exprs0;
-model.odstate[1-1]=init;
-xx.model=model;
-arg1.model.rpar.objs[path-1]=xx;
-break
-}
-}
-needcompile=0;
-if (init_old!=init) {
-newpar[size(newpar)+1-1]=1;
-needcompile=2;
-}
-x=arg1;
-y=needcompile;
-typ=newpar;
-}
JKFLIPFLOP.prototype.define = function JKFLIPFLOP() {
scs_m=scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["JKFLIPFLOP"],tol=[0.0001,0.000001,1.000e-10,100001,0,0,0],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1]=scicos_block(gui="DOLLAR_m",graphics=scicos_graphics(orig=[299.96961,261.584],sz=[40,40],flip=false,theta=0,exprs=["int8(0)","1"],pin=7,pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("dollar4_m",4),in1=1,in2=1,intyp=5,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(int8(0)),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -91,4 +49,46 @@ x=standard_define([2,3],model,[],gr_i);
}
JKFLIPFLOP.prototype.details = function JKFLIPFLOP() {
}
+JKFLIPFLOP.prototype.get = function JKFLIPFLOP() {
+}
+JKFLIPFLOP.prototype.set = function JKFLIPFLOP() {
+for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
+o=arg1.model.rpar.objs(i);
+if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") {
+path=i;
+break
+}
+}
+newpar=list();
+xx=arg1.model.rpar.objs(path);
+exprs=xx.graphics.exprs(1);
+model=xx.model;
+init_old=model.odstate(1);
+while (true) {
+[ok,init,exprs0]=scicos_getvalue([msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")," ",gettext("JK flip-flop")," ",gettext("The \'Initial Value\' must be 0 or 1 of type int8"),gettext("&nbsp;- Negative values are considered as int8(0)"),gettext("&nbsp;- Positive values are considered as int8(1)")," "],gettext("Initial Value"),list("vec",1),exprs);
+if (!ok) {
+break
+}
+if (init<=0) {
+init=int8(0);
+} else if (init>0) {
+init=int8(1);
+}
+if (ok) {
+xx.graphics.exprs[1-1]=exprs0;
+model.odstate[1-1]=init;
+xx.model=model;
+arg1.model.rpar.objs[path-1]=xx;
+break
+}
+}
+needcompile=0;
+if (init_old!=init) {
+newpar[size(newpar)+1-1]=1;
+needcompile=2;
+}
+x=arg1;
+y=needcompile;
+typ=newpar;
+}
}