best practice using variables

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

best practice using variables

Post by KennyR » Fri Mar 02, 2012 1:52 pm

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?

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: best practice using variables

Post by Klaus » Fri Mar 02, 2012 2:10 pm

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

KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Re: best practice using variables

Post by KennyR » Fri Mar 02, 2012 4:30 pm

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!

Post Reply