[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Implementing GOTO/GOSUB
- From: Rici Lake <lua@...>
- Date: Mon, 13 Sep 2004 14:05:15 -0500
On 13-Sep-04, at 1:36 PM, Asko Kauppi wrote:
Okay, here's a more polished version (still, not tried). If someone
uses it, make sure cpp doesn't add #pragma's or other such stuff in
its output (I've used 'cpp -P -xassembler-with-cpp').
#define __GOSUB(xx) __retline='#'.. #__LINE__; __GOTO=xx;
#define __RETURN __GOTO=__retline
I know that the '__GOSUB()' syntax and '__GOTO=' syntaxes are nastily
different; don't know a fix for this.. :(
As long as we're retrofitting Lua here, what about
The expressiveness of the last example is very hard to match.