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 */
<textarea id="input" rows="25" cols="100%" disabled="disabled"></textarea>
<br>
<button onclick="compile()">Execute</button>
+ <textarea id="args">Test</textarea>
<h4>Execution Output:</h4>
<textarea id="output" rows="25", cols="100%"></textarea>
</section>