fork download
  1. (function (stack, heap, callStack, main, buf) {
  2.  
  3. var WS2JS = (function defaultMethod() {
  4.  
  5. var inputBuffer = "", inputBufferIndex = 0;
  6.  
  7. function getInput() {
  8. if (!inputBuffer || inputBuffer.length <= inputBufferIndex) {
  9. inputBuffer = prompt("");
  10. if (inputBuffer !== null) {
  11. document.write(inputBuffer);
  12. inputBuffer += "\n";
  13. }
  14. document.write("<BR>");
  15. inputBufferIndex = 0;
  16. }
  17. }
  18.  
  19. return {
  20.  
  21. putc : function (c) {
  22. document.write(c === 10 ? "\n<BR>" : String.fromCharCode(c));
  23. },
  24.  
  25. putn : function (n) {
  26. document.write(n);
  27. },
  28.  
  29. getc : function (callback) {
  30. getInput();
  31. var c = inputBuffer === null ? -1 : inputBuffer.charCodeAt(inputBufferIndex++);
  32. setTimeout(function () { callback(c);}, 0);
  33. },
  34.  
  35. getn : function (callback) {
  36. getInput();
  37. var s = (inputBuffer||"").substr(inputBufferIndex), n = parseInt(s, 10) || 0;
  38. if (inputBuffer)
  39. inputBufferIndex += s.indexOf("\n") + 1;
  40. setTimeout(function () { callback(n);}, 0);
  41. },
  42.  
  43. onExit : function () {
  44. document.write("\n");
  45. document.close();
  46. }
  47.  
  48. };
  49. })();
  50.  
  51. (main = function (label, end) { do switch(label) {
  52.  
  53. case 0:
  54.  
  55. stack.push(3.3359833387980225e+155);
  56.  
  57. case 1:
  58.  
  59. WS2JS.onExit();
  60.  
  61. case 2:
  62.  
  63. end = 1; break;
  64.  
  65. default: throw new Error('Invalid label :' + label);} while (!end);})(0);
  66.  
  67. })([], {}, []);
  68.  
  69.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.nim(1, 47) Error: ')' expected
stdout
Standard output is empty