From ef80c6da7e0063067459cd2ca2ec295d4918560b Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Tue, 13 Nov 2012 04:04:31 +0000 Subject: [PATCH] Should now run programs in the browser, just need to compile the examples and load them up --- javascripts/compiler.js | 12 +++++------- test.html | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/javascripts/compiler.js b/javascripts/compiler.js index 2c4abcf..457b700 100644 --- a/javascripts/compiler.js +++ b/javascripts/compiler.js @@ -189,14 +189,12 @@ function update() { doc.value = examples[sel[sel.selectedIndex].value - 1]; } - function compile() { - //run ([ - // document.getElementById("eg").selectedIndex.toString(), - // document.getElementById("args") - //]); - //document.write("Hello World\n"); - run (["hello.dat"]); + var args = [ + 'dat/' + document.getElementById("eg").selectedIndex.toString() + '.dat' + ].concat(document.getElementById("args").value.split()); + document.getElementById("output").value = "Executing " + args.toString().replace(',', ' '); + run (args); } /* set initial */ diff --git a/test.html b/test.html index 8fdd98e..557baa7 100644 --- a/test.html +++ b/test.html @@ -48,6 +48,7 @@
+

Execution Output:

-- 2.39.2