Page 1 of 1

best practice using variables

Posted: Fri Mar 02, 2012 1:52 pm
by KennyR
probably a stupid question but if you have a variable like "vName" that is being used multiple times in a program with different information stored in it each time, should the variable be cleared after each use? If not, can this cause issues when a new set of data is being put into the variable?

Re: best practice using variables

Posted: Fri Mar 02, 2012 2:10 pm
by Klaus
Hi Kenny,

if you "put XYZ into vName" then the original content of the variable is being replaced with the new value.
Does that answer your question?


Best

Klaus

Re: best practice using variables

Posted: Fri Mar 02, 2012 4:30 pm
by KennyR
Thank you Klaus...you are always quick to respond and always helpful...

Well I guess I need to look elsewhere in my brain to figure out what could be happening then...I cannot seem to figure out why I am getting extra characters on the end of a option menu that is populated with a user defined variable....
* this is my original post http://forums.runrev.com/phpBB2/viewtop ... 12&t=11210

Thanks again Klaus!