+ 2

Why a variable change it’s value?

@Can you do something to prevent the variables to change value in the same program?

3rd Apr 2018, 3:28 AM
Fabio
Fabio - avatar
2 Answers
+ 4
That is the behavior of a variable. Keep in mind that there is data that should or may change during execution. If you want your variable to not change at any time during program execution, it is best to declare it as a constant. That way you reassure yourself that your value will remain unchanged.
3rd Apr 2018, 3:56 AM
Mickel
Mickel - avatar
0
Thank you. How do you declare it as a constant?
3rd Apr 2018, 1:15 PM
Fabio
Fabio - avatar