| CODE |
FOR = : : [BREAK] : : NEXT Where: is the name of the var to track the value (Incremented on NEXT) BREAK skips to the appropriate NEXT and exits the loop prematurely. |
| CODE |
GOSUB |
| CODE |
FOR index = 1 to 3 FOR innerindex = 5 to 7 CallScript _DisplayMessageBox "Nested: %innerindex% %index%" GOSUB MySub NEXT NEXT QUIT :MySub CallScript _DisplayMessageBox "GoSub: %innerindex% %index%" RETURN |
| QUOTE (geniusalz @ Dec 17 2003, 02:01 AM) |
| Heh. I asked whether nested FOR loops are supported in the other thread, but here I asked for recursion here. Like recursive factorial computation * Ignore all the syntax errors SETVAR N 5 SETVAR result 1 GOSUB Factorial :Factorial MUL result %N% SUB %N% 1 IF# N==1 GOTO Blah GOSUB Factorial Blah: RETURN |
| QUOTE (geniusalz @ Dec 17 2003, 01:57 PM) |
| Bad things. Now I see how exploits work. So you could have people writing exploits for MXM if it didn't prevent stack overflows ::end of rambling |