Skip to content

Instantly share code, notes, and snippets.

@kavun
Last active April 1, 2021 04:45
Show Gist options
  • Save kavun/5718851 to your computer and use it in GitHub Desktop.
Save kavun/5718851 to your computer and use it in GitHub Desktop.

Revisions

  1. kavun renamed this gist Jun 8, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions WSHConsole.js → WSHRepl.js
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    function print(text) {
    WScript.Echo('> ' + text);
    WScript.Echo('> ' + text);
    }

    var stdin = WScript.StdIn;
    var stdin = WScript.StdIn;
    var stdout = WScript.StdOut;
    var input;

  2. kavun revised this gist Jun 8, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion WSHConsole.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    function print(text) {
    WScript.Echo(text);
    WScript.Echo('> ' + text);
    }

    var stdin = WScript.StdIn;
  3. kavun created this gist Jun 6, 2013.
    16 changes: 16 additions & 0 deletions WSHConsole.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    function print(text) {
    WScript.Echo(text);
    }

    var stdin = WScript.StdIn;
    var stdout = WScript.StdOut;
    var input;

    do {
    var input = stdin.ReadLine();
    try {
    print(eval(input));
    } catch (e) {
    print(e.name + ': ' + e.message);
    }
    } while (input != 'exit');