Set a previously registered symbol as global.
1 static int add(int a, int b) { 2 return a + b; 3 } 4 5 auto ctx = new DukContext(); 6 ctx.registerGlobal!add; 7 8 auto res = ctx.evalString!int("add(1, 5)"); 9 assert(res == 6);
See Implementation
Set a previously registered symbol as global.