Page 2 of 2

Posted: Wed Nov 09, 2005 3:52 pm
by Jeroen Oosterlaar
d11wtq wrote:Put simply....

You use constants where the value never needs to change
Use variables where the data can change (i.e. variable ;) )

Coding in other languages perhaps makes the distinction clearer :)
Yes, but practically you don't need to use constants. It is just a matter of definition and design as I said. As a programmer, you control what happens with the variables. It is not like you have to protect your software against yourself or something.

Posted: Wed Nov 09, 2005 3:54 pm
by Luke
Jeroen Oosterlaar wrote:
d11wtq wrote:Put simply....

You use constants where the value never needs to change
Use variables where the data can change (i.e. variable ;) )

Coding in other languages perhaps makes the distinction clearer :)
Yes, but practically you don't need to use constants. It is just a matter of definition and design as I said. As a programmer, you control what happens with the variables. It is not like you have to protect your software against yourself or something.
You might have to if you have multiple personality syndrome... your other personality might want to change that variable to be mean.

Posted: Wed Nov 09, 2005 3:56 pm
by Jeroen Oosterlaar
One armed space goat wrote:
Jeroen Oosterlaar wrote:
d11wtq wrote:Put simply....

You use constants where the value never needs to change
Use variables where the data can change (i.e. variable ;) )

Coding in other languages perhaps makes the distinction clearer :)
Yes, but practically you don't need to use constants. It is just a matter of definition and design as I said. As a programmer, you control what happens with the variables. It is not like you have to protect your software against yourself or something.
You might have to if you have multiple personality syndrome... your other personality might want to change that variable to be mean.
:lol:!