summaryrefslogtreecommitdiff
path: root/js/Sources/CLKIN_f.js
diff options
context:
space:
mode:
authorSunil Shetye2018-07-09 11:43:39 +0530
committerSunil Shetye2018-07-09 12:16:25 +0530
commit62b1d7dd9183ed75733b44104890586b03818214 (patch)
tree9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Sources/CLKIN_f.js
parent5c011853630a1b466ef4789d5b600dd530d0a3ec (diff)
downloadsci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz
sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2
sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Sources/CLKIN_f.js')
-rw-r--r--js/Sources/CLKIN_f.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js
index 08373047..03f3c741 100644
--- a/js/Sources/CLKIN_f.js
+++ b/js/Sources/CLKIN_f.js
@@ -2,15 +2,15 @@
function CLKIN_f() {
CLKIN_f.prototype.define = function CLKIN_f() {
this.prt = 1;
- model = scicos_model();
- model.sim = "input";
- model.evtout = 1;
- model.ipar = this.prt;
- model.blocktype = "d";
- model.firing = -1;
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("input");
+ this.model.evtout = new ScilabDouble(1);
+ this.model.ipar = new ScilabDouble(this.prt);
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = new ScilabDouble(-1);
+ this.model.dep_ut = [false,false];
exprs = string(this.prt);
- this.x = standard_define([1,1],model,exprs," ");
+ this.x = standard_define([1,1],this.model,exprs," ");
return new BasicBlock(this.x);
}
CLKIN_f.prototype.details = function CLKIN_f() {
@@ -25,7 +25,7 @@ function CLKIN_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
graphics = arg1.graphics;
- model = arg1.model;
+ this.model = arg1.model;
exprs = graphics.exprs;
exprs = exprs[1-1];
while (true) {
@@ -37,12 +37,12 @@ function CLKIN_f() {
if (this.prt<=0) {
message("Port number must be a positive integer");
} else {
- model.ipar = this.prt;
- model.evtout = 1;
- model.firing = -1;
+ this.model.ipar = new ScilabDouble(this.prt);
+ this.model.evtout = new ScilabDouble(1);
+ this.model.firing = new ScilabDouble(-1);
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}