Skip to content

Instantly share code, notes, and snippets.

@kpmy
Created May 22, 2016 16:45
Show Gist options
  • Save kpmy/27d850628a305515334fe9b95dd152ac to your computer and use it in GitHub Desktop.
Save kpmy/27d850628a305515334fe9b95dd152ac to your computer and use it in GitHub Desktop.
function ModuleTest(rts) {
const mod = this;
mod.ImportLog = rts.load("Log");
mod.$x = new rts.Obj(new rts.Type("ANY"));
mod.$y = new rts.Obj(new rts.Type("ANY"));
mod.$z = new rts.Obj(new rts.Type("ANY"));
mod.$Do = function() {
var $i = new rts.Obj(new rts.Type("ANY"));
var $j = new rts.Obj(new rts.Type("ANY"));
var $k = new rts.Obj(new rts.Type("ANY"));
mod.$y.value = (new rts.Value("INTEGER", 1));
$i.value = (new rts.Value("INTEGER", 10));
};
mod.start = function() {
console.log('dynamic load Test');
mod.$x.value = (new rts.Value("INTEGER", 0));
(mod.$Do());
};
};
module.exports = function(rts) {
return new ModuleTest(rts)
};
UNIT Test
IMPORT Log
VAR x, y, z ANY
BLOCK Do
VAR i, j, k ANY
BEGIN
1 -> y
10 -> i
END Do
START
0 -> x
Do
END Test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment