Convert javascript examples to nodejs.
This commit is contained in:
parent
dbf2b1fe94
commit
5da54ca435
48 changed files with 312 additions and 223 deletions
|
|
@ -1,5 +1,4 @@
|
|||
// Operator overloading example
|
||||
|
||||
var example = require("./build/Release/example");
|
||||
|
||||
a = new example.intSum(0);
|
||||
b = new example.doubleSum(100.0);
|
||||
|
|
@ -11,6 +10,6 @@ for (i=1;i<=100;i++)
|
|||
a.call(i); // Note: function call
|
||||
b.call(Math.sqrt(i)); // Note: function call
|
||||
|
||||
print(a.result());
|
||||
print(b.result());
|
||||
console.log(a.result());
|
||||
console.log(b.result());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue