View Full Version : local variables
BigWumpus
- 14th February 2006, 22:24
I wish to use local variables...
There must be a structure to mark parts of code to use local variables. It must be possible to use the same variable-name in different subroutines without using the same ram-location.
BigWumpus
- 10th April 2006, 21:55
Hey ... wasup ???? sleeping ????
I think local variables are easy to implement !
like:
startlocal I
(by now, the compiler adds a incrementing number to the variable, here it will be feg: loc_I_1)
endlocal I
(...it is lost...)
The compiler has a seperat RAM-Locationlist for all this local variables and they are used like a stack... If Var1, var2 and var3 are used, var3 may be cleared, so var4 gets the same adress as var3...
This will not be the best, but I think it is a first way...
Archilochus
- 10th April 2006, 23:39
It must be possible to use the same variable-name in different subroutines without using the same ram-location
Yikes! - I know that if I used the same variable name, but different subs changed different RAM locations, I'd get hopelessly lost in writing any code at all!
Powered by vBulletin® Version 4.1.7 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.