espresso()
app.module()
app.use()
app.get()
app.post()
app.put()
app.delete()
auto espresso = import("espresso");
// Standard super module
// console is instatiated and macro __dir is initialized
console.log(__dir);
auto espresso =
import("espresso");
console.log("hello world");
auto espresso =
import("espresso");
auto n = 123;
// int
console.log( __typeof n);
auto espresso =
import("espresso");
var n = 123;
// var
console.log( __typeof n);
auto espresso =
import("espresso");
Integer n = 123;
// Integer
console.log( __typeof n);
auto espresso =
import("espresso");
Integer n = 123;
console.log(__typeof n);
auto espresso =
import("espresso");
var n = __new 123;
// Integer * type -> naked pointer causes memory leakage
console.log(__typeof n);
auto espresso =
import("espresso");
var n = scope(__new 123);
// Integer * type -> No memory leakage: Deletes the pointer when goes out of scope
console.log(__typeof n);
auto espresso =
import("espresso");
void
say(void(*foo)(char*)){
foo("hello world");
}
say( function(msg){
console.log(msg);
}); //Call the say() and prints hello world
auto espresso =
import("espresso");
auto func = function(x, y){
return x + y;
}
console.log(func(2 // 4
__cplusplus: const char* s = "hello __cplusplus macro";
__cplusplus{
const char* s = "hello __cplusplus macro";
// do some more stuffs with C++ ...
}
console.log(s);// Correct
function say() {
console.log(" hello");
} // Warning
function say() {
char* s = "hello";
return s;
} // NO Warning
__no_return function say() {
console.log(" hello");
} // No Warning
auto espresso =
import("espresso");
console.log(__dir);