loop.runtime.js
来自「javascript扩展库」· JavaScript 代码 · 共 43 行
JS
43 行
// test bug found by Christer Forslund,// which cause bad compilationfunction global_setup() { // don't use i, because global value conlicts with test runner for(xyz = 0; xyz < 10; xyz++) { foo->(); } trace(xyz);}function foo() {}global_setup();assertTrail(10);// test bug found by Kris Zyp where// a for loop without braces goes into// an infinite loopfunction test_infinite_loop() { for(var i = 0; i < 10; i++) foo->(); trace(i);}test_infinite_loop();assertTrail(10);function bar(i) { trace(i);}function test_no_braces() { var x = {1:2, 3:4}; for (var i in x) bar->(i);}test_no_braces();assertTrail(1, 3);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?