Your example shows me error
TomasRoj opened this issue · 2 comments
Hey,
I tried your example of adding two numbers but it shows me this error message:
(function (exports, require, module, __filename, __dirname) { function add2(x: Int, y: Int): Int {
^
SyntaxError: Unexpected token :
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
I wrote it via vscode extension. Is it problem with my configuration or something?
Same problem today
I tried and it works. I think you got an error because of a missing Node.js configuration or something related to it.
Output
Reading app code...
Executing app code...
Done with -- 85
Code - add.bsq
namespace NSMain;
function add2(x: Int, y: Int): Int {
return x + y;
}
entrypoint function main(): Int {
var x = 10;
var y = 75;
return add2(x, y); // Output should be: 85
}