diff options
Diffstat (limited to 'js/Branching/GOTO.js')
-rw-r--r-- | js/Branching/GOTO.js | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/js/Branching/GOTO.js b/js/Branching/GOTO.js index ec23ad47..c7355935 100644 --- a/js/Branching/GOTO.js +++ b/js/Branching/GOTO.js @@ -15,42 +15,43 @@ function GOTO() { model.dep_ut = [false,false]; exprs = [["A"],[sci2exp(1)]]; gr_i = []; - x = standard_define([2,1],model,exprs,gr_i); - x.graphics.id = "Goto"; + this.x = standard_define([2,1],model,exprs,gr_i); + this.x.graphics.id = "Goto"; } GOTO.prototype.details = function GOTO() { + return this.x; } GOTO.prototype.get = function GOTO() { } GOTO.prototype.set = function GOTO() { - x = arg1; + this.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 = false; -} - 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) + [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 = false; + } + if (ok) { + if (((model.ipar!=tagvis)||(model.opar!=list(tag)))) { + needcompile = 4; + y = needcompile; + } + graphics.exprs = exprs; + model.opar = list(tag); + model.ipar = tagvis; + this.x.model = model; + this.x.graphics = graphics; + arg1 = this.x; + break; + } + } + needcompile=resume(needcompile) } } |