03-31-2009, 02:02 PM
boriel Wrote:Hey! That's a GREAT idea! :!: Thanks a lot. I think I could implement them as a macro so you cuould do something like:I think, this could work, but it maybe could also be forced using this syntax
Code:Function f
DIM a as byte
...
End Function
The local variable 'a' (parameters are also local variables in the end) could be translated as:
Notice the _f (function name) is prepended to the variable names defined into that funcion. This is because there could be more than one "a" variable (one in the global scope and another in the local scope). So now you can do this:Code:#define _f_a ix + 3
Code:ld a, (_f_a)
add a, 2
ld (_f_a), a ; LET a = a + 2
¿What do you think?
Code:
DIM _a as uinteger
Thats just a idea, sorry, but I never created a compiler myself yet.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!