Quick question, does the data in the variables within a procedure get stored until the next time the procedure executes or erased? Am I correct that functions keep the data in the variables after the function has finished?
thanks -l8ern
Quick question, does the data in the variables within a procedure get stored until the next time the procedure executes or erased? Am I correct that functions keep the data in the variables after the function has finished?
thanks -l8ern

It should, I believe.
The only thing is if you have a variable inside of a method.. It won't be possible to be accessed by another method outside of it.
It depends on global variables and local variables
Global = everything
Local = only one procedure
As i recall, a function is always false until proved otherwise. I do this. In each procedure i reset it at the beginning to 0 or antother nother. by doing var:=0
In a function, less you are using your own thingy to return. it is auto false or use else
The Welcoming Party
Don't be a Fakawi! Get 25 hours of sleep a day!
Yea, and variables start at 0. If you want to reset them back to 0, do VarName:= 0
Global :
LocalCode:program New; {.include SRL/SRL.Scar} var///These are Global Variables i, o, shit, yea : Integer; const //---------------------- //----------------------
Code:procedure Showya; var y, ui, to : Integer;//Local Variables! Their stored integer can't be used in other begin //procedures/functions in the same script. Writeln('Ok, w/e'); end;
There are currently 1 users browsing this thread. (0 members and 1 guests)