When is the variable deleted?

 

Hello,

I read the manual and found the rules regarding the variables getting deleted unless they are not used for long or does not change value. I got a little confused regarding the variables declared outside of the start() function.

I take one of the lowest price point for some period of time and store it in a variable which I have declared outside of start(). It is not a global variable. I need this variable to persist its value for long time (e.g. 2-3 months). My question is: is there any danger that the variable loses its value?

Thank you

 
mkheidzedavid:

Hello,

I read the manual and found the rules regarding the variables getting deleted unless they are not used for long or does not change value. I got a little confused regarding the variables declared outside of the start() function.

I take one of the lowest price point for some period of time and store it in a variable which I have declared outside of start(). It is not a global variable. I need this variable to persist its value for long time (e.g. 2-3 months). My question is: is there any danger that the variable loses its value?

Thank you

It's talking about Global Variables not variables . . . do not confuse globally declared variables/variables with global scope with Global Variables.