且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在运行时将字符串转换为代码

更新时间:2023-01-10 17:36:32

可以使用TCC( http://bellard.org/tcc/).它允许在运行时本地编译和运行代码.另一种方法是使用解释器,那里有很多(LUA,Python等,请参见列表 wiki ).

It is possible to use TCC ( http://bellard.org/tcc/ ). It allows to compile and run code natively at runtime. Another approach is to use an interpreter, there are plenty out there (LUA, Python etc, see list wiki).