Tuesday, July 21, 2009

New script feature

Expression e0 = new Expression("133.0 * 133.0");
printf("%s\n",typeinfo(e0.run()));

Expression e1 = new Expression("{
int a,b,c,d;
return a + b + c + d;
}","a,b,c,d");
printf("%s\n",typeinfo(e1.run(1,2,3,4)));

Expression e2 = new Expression("{
string name;
File file = new File(name,\"rb\");
int size = file.getSize();
file.close();
delete file;
return size;
}","name");
printf("%s\n",typeinfo(e2.run("test.cpp")));



float: 17689
int: 10
int: 36339

2 comments:

  1. That's cool!
    Will the new release of GLSH, and if so when?

    ReplyDelete
  2. +1 for the new release of GLSH.

    ReplyDelete