how to clear variables when using again
Author |
Message |
dani190
|
Posted: Thu Dec 15, 2005 8:16 pm Post subject: how to clear variables when using again |
|
|
hey guys im making a program which has to be copied once but i need to use the same variables, is there a way to clear there values and use again or do i half to change all of the variables all together and re declare in new part ? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Cervantes
|
Posted: Thu Dec 15, 2005 8:29 pm Post subject: (No subject) |
|
|
Check out the Turing Oddities contest in the [Contest] section if you want to set a variable back to having no value.
You should probably ignore the above comment, as it is pretty difficult. You should probably just set it back to 0, or a null string, etc. |
|
|
|
|
|
Geminias
|
Posted: Thu Dec 15, 2005 10:35 pm Post subject: (No subject) |
|
|
dani, you can reuse variables without setting them back to null.
For instance, if i have a variable called variable and i use it in one context that manipulates it to the value 5, i can then ignore this value if i want to set it to another value. By declaring a variables value like this:
variable := value
you make that variable equal to that value. Unless you did something stupid like try to make it a value of the wrong type. |
|
|
|
|
|
|
|