Skip to content

Commit

Permalink
Program.run calls runtime.flush, if exists; console samples refactore…
Browse files Browse the repository at this point in the history
…d to use getRuntime()
  • Loading branch information
ajlopez committed Dec 26, 2012
1 parent 99b7bda commit 3e0a714
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/cobolscript.js
Expand Up @@ -555,7 +555,9 @@ var cobolscript = (function() {
};

Program.prototype.run = function(runtime) {
return this.procedure(runtime, this);
var result = this.procedure(runtime, this);
if (runtime && runtime.flush && typeof(runtime.flush) == 'function')
runtime.flush();
};

function compileFunction(text) {
Expand Down
2 changes: 1 addition & 1 deletion samples/factorial/run.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion samples/hello/run.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion samples/hellopgm/run.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion samples/local/run.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion samples/template/run.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e0a714

Please sign in to comment.