selfload.sl
来自「一个C格式的脚本处理函数库源代码,可让你的C程序具有执行C格式的脚本文件」· SL 代码 · 共 43 行
SL
43 行
% This is also a good test to perform leak checking on._debug_info = 1; () = evalfile ("inc.sl");print ("Testing recursive function modifications ...");variable X = "";variable V1 = "define crash () { eval(V2); X += \"V1\"; }";variable V2 = "define crash () { eval(V1); X += \"V2\"; }";define crash ();define crash (){ eval (V1); crash (); if (X != "V1") failed ("V1"); if (1) { eval (V2); crash (); if (X != "V1V2") failed ("V1V2"); if (1) eval (V1); crash (); if (X != "V1V2V1") failed ("V1V2V1"); } X += "V0";}crash ();if (X != "V1V2V1V0") failed ("V1V2V1V0 : ", + X);print ("Ok\n");exit (0);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?