From a208791a02511d50eed1663203ac26eabfdfaa6f Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Sat, 16 Jun 2018 17:49:33 +0530 Subject: add spacing in for statement --- js/Electrical/CCS.js | 2 +- js/Electrical/CVS.js | 2 +- js/Electrical/Gyrator.js | 2 +- js/Electrical/IdealTransformer.js | 2 +- js/Electrical/NPN.js | 2 +- js/Electrical/PNP.js | 2 +- js/Events/MCLOCK_f.js | 2 +- js/Hydraulics/Flowmeter.js | 2 +- js/IntegerOp/JKFLIPFLOP.js | 2 +- js/IntegerOp/SRFLIPFLOP.js | 2 +- js/Linear/DELAY_f.js | 2 +- js/Linear/PID.js | 2 +- js/MatrixOp/EXTRACT.js | 4 ++-- js/Misc/BOUNCE.js | 8 ++++---- js/Misc/BOUNCEXY.js | 4 ++-- js/Misc/CONSTRAINT2_c.js | 2 +- js/Misc/ENDBLK.js | 6 +++--- js/Sinks/CANIMXY3D.js | 2 +- js/Sinks/CMSCOPE.js | 2 +- js/Sinks/CSCOPXY3D.js | 2 +- js/Sources/CLOCK_c.js | 2 +- js/Sources/CLOCK_f.js | 2 +- js/Sources/FROMWSB.js | 6 +++--- js/Threshold/ZCROSS_f.js | 2 +- 24 files changed, 33 insertions(+), 33 deletions(-) (limited to 'js') diff --git a/js/Electrical/CCS.js b/js/Electrical/CCS.js index 7b6c8f8a..05beb332 100644 --- a/js/Electrical/CCS.js +++ b/js/Electrical/CCS.js @@ -20,7 +20,7 @@ MI=[]; MO=[]; P=[2,50,1,0,70,98,2,0,70,2,-2,0]; PortName=["Iin","p","n"]; -for(i=1;i<=size(P,"r");i+=1) { +for (i=1;i<=size(P,"r");i+=1) { if (P(i,3)==1) { Typein=[Typein,"E"]; MI=[MI,PortName(i)]; diff --git a/js/Electrical/CVS.js b/js/Electrical/CVS.js index fafe0170..f775ee36 100644 --- a/js/Electrical/CVS.js +++ b/js/Electrical/CVS.js @@ -20,7 +20,7 @@ MI=[]; MO=[]; P=[2,50,1,0,70,98,2,0,70,2,-2,0]; PortName=["vin","p","n"]; -for(i=1;i<=size(P,"r");i+=1) { +for (i=1;i<=size(P,"r");i+=1) { if (P(i,3)==1) { Typein=[Typein,"E"]; MI=[MI,PortName(i)]; diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js index bd401713..4b5c01c9 100644 --- a/js/Electrical/Gyrator.js +++ b/js/Electrical/Gyrator.js @@ -30,7 +30,7 @@ MI=[]; MO=[]; P=[2.5,90,2,0,2.5,10,2,0,97.5,90,-2,0,97.5,10,-2,0]; PortName=["p1","n1","p2","n2"]; -for(i=1;i<=size(P,"r");i+=1) { +for (i=1;i<=size(P,"r");i+=1) { if (P(i,3)==1) { Typein=[Typein,"E"]; MI=[MI,PortName(i)]; diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js index 9f127ca9..52631f73 100644 --- a/js/Electrical/IdealTransformer.js +++ b/js/Electrical/IdealTransformer.js @@ -30,7 +30,7 @@ MI=[]; MO=[]; P=[2.5,90,2,0,2.5,10,2,0,97.5,90,-2,0,97.5,10,-2,0]; PortName=["p1","n1","p2","n2"]; -for(i=1;i<=size(P,"r");i+=1) { +for (i=1;i<=size(P,"r");i+=1) { if (P(i,3)==1) { Typein=[Typein,"E"]; MI=[MI,PortName(i)]; diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js index 18dd01a7..af20e840 100644 --- a/js/Electrical/NPN.js +++ b/js/Electrical/NPN.js @@ -30,7 +30,7 @@ MI=[]; MO=[]; P=[100,90,-2,0,0,50,2,0,100,10,-2,0]; PortName=["C","B","E"]; -for(i=1;i<=size(P,"r");i+=1) { +for (i=1;i<=size(P,"r");i+=1) { if (P(i,3)==1) { Typein=[Typein,"E"]; MI=[MI,PortName(i)]; diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js index a6201f02..9f5c916c 100644 --- a/js/Electrical/PNP.js +++ b/js/Electrical/PNP.js @@ -30,7 +30,7 @@ MI=[]; MO=[]; P=[100,90,-2,0,0,50,2,0,100,10,-2,0]; PortName=["C","B","E"]; -for(i=1;i<=size(P,"r");i+=1) { +for (i=1;i<=size(P,"r");i+=1) { if (P(i,3)==1) { Typein=[Typein,"E"]; MI=[MI,PortName(i)]; diff --git a/js/Events/MCLOCK_f.js b/js/Events/MCLOCK_f.js index 10706233..f28cd0bb 100644 --- a/js/Events/MCLOCK_f.js +++ b/js/Events/MCLOCK_f.js @@ -3,7 +3,7 @@ function MCLOCK_f() { MCLOCK_f.prototype.get = function MCLOCK_f() { } MCLOCK_f.prototype.set = function MCLOCK_f() { -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { o=arg1.model.rpar.objs(i); if (typeof(o)=="Block"&&o.gui=="MFCLCK_f") { path=i; diff --git a/js/Hydraulics/Flowmeter.js b/js/Hydraulics/Flowmeter.js index 2481eab0..65143545 100644 --- a/js/Hydraulics/Flowmeter.js +++ b/js/Hydraulics/Flowmeter.js @@ -30,7 +30,7 @@ MI=[]; MO=[]; P=[50,105,-1,90,0,10,2,0,101,10,-2,0]; PortName=["Mesure","C1","C2"]; -for(i=1;i<=size(P,"r");i+=1) { +for (i=1;i<=size(P,"r");i+=1) { if (P(i,3)==1) { Typein=[Typein,"E"]; MI=[MI,PortName(i)]; diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js index 250a4697..14641c09 100644 --- a/js/IntegerOp/JKFLIPFLOP.js +++ b/js/IntegerOp/JKFLIPFLOP.js @@ -3,7 +3,7 @@ function JKFLIPFLOP() { JKFLIPFLOP.prototype.get = function JKFLIPFLOP() { } JKFLIPFLOP.prototype.set = function JKFLIPFLOP() { -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +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; diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js index bf0a2ac0..33c1dcfa 100644 --- a/js/IntegerOp/SRFLIPFLOP.js +++ b/js/IntegerOp/SRFLIPFLOP.js @@ -3,7 +3,7 @@ function SRFLIPFLOP() { SRFLIPFLOP.prototype.get = function SRFLIPFLOP() { } SRFLIPFLOP.prototype.set = function SRFLIPFLOP() { -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +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; diff --git a/js/Linear/DELAY_f.js b/js/Linear/DELAY_f.js index f4372065..5b3b20da 100644 --- a/js/Linear/DELAY_f.js +++ b/js/Linear/DELAY_f.js @@ -4,7 +4,7 @@ DELAY_f.prototype.get = function DELAY_f() { } DELAY_f.prototype.set = function DELAY_f() { ppath=list(0,0); -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { o=arg1.model.rpar.objs(i); if (typeof(o)=="Block"&&o.gui=="REGISTER_f") { ppath[1-1]=i; diff --git a/js/Linear/PID.js b/js/Linear/PID.js index cf55e494..d54409e2 100644 --- a/js/Linear/PID.js +++ b/js/Linear/PID.js @@ -4,7 +4,7 @@ PID.prototype.get = function PID() { } PID.prototype.set = function PID() { ppath=list(0,0,0); -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { o=arg1.model.rpar.objs(i); if (typeof(o)=="Link") { from=arg1.model.rpar.objs(o.from(1)); diff --git a/js/MatrixOp/EXTRACT.js b/js/MatrixOp/EXTRACT.js index 685ee370..6bd3ad1c 100644 --- a/js/MatrixOp/EXTRACT.js +++ b/js/MatrixOp/EXTRACT.js @@ -35,13 +35,13 @@ if ((ma==0||mb==0)) { message("empty field"); ok=None; } -for(i=1;i<=ma;i+=1) { +for (i=1;i<=ma;i+=1) { if ((a(i)<=0)) { message("invalid index"); ok=None; } } -for(j=1;j<=mb;j+=1) { +for (j=1;j<=mb;j+=1) { if ((b(j)<=0)) { message("invalid index"); ok=None; diff --git a/js/Misc/BOUNCE.js b/js/Misc/BOUNCE.js index 5328a819..8c3ba2b5 100644 --- a/js/Misc/BOUNCE.js +++ b/js/Misc/BOUNCE.js @@ -44,8 +44,8 @@ break if (ok) { k=1; ipar=[]; -for(i=1;i<=n;i+=1) { -for(j=i+1;j<=n;j+=1) { +for (i=1;i<=n;i+=1) { +for (j=i+1;j<=n;j+=1) { ipar[k-1]=i; k=k+1; ipar[k-1]=j; @@ -69,8 +69,8 @@ BOUNCE.prototype.define = function BOUNCE() { n=2; k=1; ipar=[]; -for(i=1;i<=n;i+=1) { -for(j=i+1;j<=n;j+=1) { +for (i=1;i<=n;i+=1) { +for (j=i+1;j<=n;j+=1) { ipar[k-1]=i; k=k+1; ipar[k-1]=j; diff --git a/js/Misc/BOUNCEXY.js b/js/Misc/BOUNCEXY.js index cee2800f..0fe9c488 100644 --- a/js/Misc/BOUNCEXY.js +++ b/js/Misc/BOUNCEXY.js @@ -36,7 +36,7 @@ message(mess); rpar=[xmin,xmax,ymin,ymax]; ipar=[win,imode,clrs.slice()]; z=[]; -for(i=1;i<=size(clrs,"*");i+=1) { +for (i=1;i<=size(clrs,"*");i+=1) { z[6*(i-1)+1-1]=0; z[6*(i-1)+2-1]=0; z[6*(i-1)+3-1]=2*siz(i); @@ -70,7 +70,7 @@ model.in2=[1,1]; model.intyp=[1,1]; model.evtin=1; z=[]; -for(i=1;i<=size(clrs,"*");i+=1) { +for (i=1;i<=size(clrs,"*");i+=1) { z[6*(i-1)+1-1]=0; z[6*(i-1)+2-1]=0; z[6*(i-1)+3-1]=2*siz(i); diff --git a/js/Misc/CONSTRAINT2_c.js b/js/Misc/CONSTRAINT2_c.js index 1fcf1056..e4c460ef 100644 --- a/js/Misc/CONSTRAINT2_c.js +++ b/js/Misc/CONSTRAINT2_c.js @@ -28,7 +28,7 @@ x_message("number of states (constraints) must be > 0 "); ask_again=true; } if ((!ask_again)) { -for(i=1;i<=N;i+=1) { +for (i=1;i<=N;i+=1) { if (!((id(i)==0)||(id(i)==1))) { ask_again=true; x_message(["Id(i) must be either","0 when x\'(i) is not present in the feedback","1: when x\'(i) is present in the feedback"]); diff --git a/js/Misc/ENDBLK.js b/js/Misc/ENDBLK.js index 91699d72..ecc38460 100644 --- a/js/Misc/ENDBLK.js +++ b/js/Misc/ENDBLK.js @@ -3,7 +3,7 @@ function ENDBLK() { ENDBLK.prototype.get = function ENDBLK() { } ENDBLK.prototype.set = function ENDBLK() { -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { o=arg1.model.rpar.objs(i); if (typeof(o)=="Block"&&o.gui=="END_c") { ppath=list(i); @@ -12,10 +12,10 @@ break } newpar=list(); y=0; -for(path in ppath) { +for (path in ppath) { np=size(path,"*"); spath=list(); -for(k=1;k<=np;k+=1) { +for (k=1;k<=np;k+=1) { spath[$+1-1]="model"; spath[$+1-1]="rpar"; spath[$+1-1]="objs"; diff --git a/js/Sinks/CANIMXY3D.js b/js/Sinks/CANIMXY3D.js index 870ee544..4e31e07b 100644 --- a/js/Sinks/CANIMXY3D.js +++ b/js/Sinks/CANIMXY3D.js @@ -42,7 +42,7 @@ mess=[mess,"Buffer size must be at least 1"," "]; ok=None; } if (N<2) { -for(i=1;i<=nbr_curves;i+=1) { +for (i=1;i<=nbr_curves;i+=1) { if (clrs(i)>0) { mess=[mess,"Buffer size must be at least 2 or Change a color (must be <0)"," "]; ok=None; diff --git a/js/Sinks/CMSCOPE.js b/js/Sinks/CMSCOPE.js index 55f1405d..c2f36d23 100644 --- a/js/Sinks/CMSCOPE.js +++ b/js/Sinks/CMSCOPE.js @@ -41,7 +41,7 @@ if (size(per,"*")!=size(ymin,"*")) { mess=[mess,"Size of Refresh Period must equal size of Ymin/Ymax vector"," "]; ok=None; } -for(i=1;i<=size(per,"*");i+=1) { +for (i=1;i<=size(per,"*");i+=1) { if ((per(i)<=0)) { mess=[mess,"Refresh Period must be positive"," "]; ok=None; diff --git a/js/Sinks/CSCOPXY3D.js b/js/Sinks/CSCOPXY3D.js index 33c32b3b..f77ab34a 100644 --- a/js/Sinks/CSCOPXY3D.js +++ b/js/Sinks/CSCOPXY3D.js @@ -38,7 +38,7 @@ mess=[mess,"Buffer size must be at least 1"," "]; ok=None; } if (N<2) { -for(i=1;i<=size(clrs,"*");i+=1) { +for (i=1;i<=size(clrs,"*");i+=1) { if (clrs(i)>0) { mess=[mess,"Buffer size must be at least 2 or Change a color (must be >0)"," "]; ok=None; diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js index 8cad99ab..876c27be 100644 --- a/js/Sources/CLOCK_c.js +++ b/js/Sources/CLOCK_c.js @@ -3,7 +3,7 @@ function CLOCK_c() { CLOCK_c.prototype.get = function CLOCK_c() { } CLOCK_c.prototype.set = function CLOCK_c() { -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { o=arg1.model.rpar.objs(i); if (typeof(o)=="Block"&&o.gui=="EVTDLY_c") { path=i; diff --git a/js/Sources/CLOCK_f.js b/js/Sources/CLOCK_f.js index b539c077..cac1c8a5 100644 --- a/js/Sources/CLOCK_f.js +++ b/js/Sources/CLOCK_f.js @@ -3,7 +3,7 @@ function CLOCK_f() { CLOCK_f.prototype.get = function CLOCK_f() { } CLOCK_f.prototype.set = function CLOCK_f() { -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { o=arg1.model.rpar.objs(i); if (typeof(o)=="Block"&&o.gui=="EVTDLY_f") { path=i; diff --git a/js/Sources/FROMWSB.js b/js/Sources/FROMWSB.js index e6db9281..f6858549 100644 --- a/js/Sources/FROMWSB.js +++ b/js/Sources/FROMWSB.js @@ -3,7 +3,7 @@ function FROMWSB() { FROMWSB.prototype.get = function FROMWSB() { } FROMWSB.prototype.set = function FROMWSB() { -for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { o=arg1.model.rpar.objs(i); if (typeof(o)=="Block"&&o.gui=="FROMWS_c") { ppath=list(i); @@ -12,10 +12,10 @@ break } newpar=list(); y=0; -for(path in ppath) { +for (path in ppath) { np=size(path,"*"); spath=list(); -for(k=1;k<=np;k+=1) { +for (k=1;k<=np;k+=1) { spath[$+1-1]="model"; spath[$+1-1]="rpar"; spath[$+1-1]="objs"; diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js index f84335bf..acb978fe 100644 --- a/js/Threshold/ZCROSS_f.js +++ b/js/Threshold/ZCROSS_f.js @@ -17,7 +17,7 @@ if (in1<=0) { message("Block must have at least one input"); } else { kk=0; -for(jj=1;jj<=in1;jj+=1) { +for (jj=1;jj<=in1;jj+=1) { kk=kk+2^(in1+jj-1); } model.rpar=[-ones(kk,1),zeros(2^(2*in1)-kk,1)]; -- cgit