summaryrefslogtreecommitdiff
path: root/js/Branching/GOTO.js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-15 23:43:09 +0530
committerSunil Shetye2018-06-15 23:43:09 +0530
commit073f4cb62b331bb437c894e0581126e5d1ef459f (patch)
tree84d6755d231feb9feb2d79a06e0bbe7f784d86fc /js/Branching/GOTO.js
parenta8e5849586f23ffb1ecd2fe47a636b61c80c2e70 (diff)
downloadsci2js-073f4cb62b331bb437c894e0581126e5d1ef459f.tar.gz
sci2js-073f4cb62b331bb437c894e0581126e5d1ef459f.tar.bz2
sci2js-073f4cb62b331bb437c894e0581126e5d1ef459f.zip
handle space character also
required in lists
Diffstat (limited to 'js/Branching/GOTO.js')
-rw-r--r--js/Branching/GOTO.js57
1 files changed, 55 insertions, 2 deletions
diff --git a/js/Branching/GOTO.js b/js/Branching/GOTO.js
index 2bc1136a..59694dfd 100644
--- a/js/Branching/GOTO.js
+++ b/js/Branching/GOTO.js
@@ -1,3 +1,56 @@
-Syntax error in input LexToken(SEMICOLON,';',1,1444)
/* autogenerated from "macros/Branching/GOTO.sci" */
-None
+function GOTO() {
+GOTO.prototype.get = function GOTO() {
+}
+GOTO.prototype.set = function GOTO() {
+x=arg1;
+graphics=arg1.graphics;
+exprs=graphics.exprs;
+model=arg1.model;
+while (true) {
+[ok,tag,tagvis,exprs]=scicos_getvalue("Set parameters",["Tag","Tag Visibility(1=Local 2=scoped 3= global)"],list("str",-1,"vec",1),exprs);
+if (!ok) {
+break
+}
+tagvis=int(tagvis);
+if (((tagvis<1)||(tagvis>3))) {
+message("Tag Visibility must be between 1 and 3");
+ok=None;
+}
+if (ok) {
+if (((model.ipar!=tagvis)||(model.opar!=list(tag)))) {
+needcompile=4;
+y=needcompile;
+}
+graphics.exprs=exprs;
+model.opar=list(tag);
+model.ipar=tagvis;
+x.model=model;
+x.graphics=graphics;
+arg1=x;
+break
+}
+}
+needcompile=resume(needcompile)
+}
+GOTO.prototype.define = function GOTO() {
+model=scicos_model();
+model.sim="goto";
+model.in=-1;
+model.in2=-2;
+model.intyp=-1;
+model.out=[];
+model.out2=[];
+model.outtyp=1;
+model.ipar=int(1);
+model.opar=list("A");
+model.blocktype="c";
+model.dep_ut=[None,None];
+exprs=["A",sci2exp(1)];
+gr_i=[];
+x=standard_define([2,1],model,exprs,gr_i);
+x.graphics.id="Goto";
+}
+GOTO.prototype.details = function GOTO() {
+}
+}