Problem with variable being overwritten unintendedly

Hello everyone,

I am encountering an issue with the following part of my Teddy script:

As you can see, I start a loop at the end which should increase #i0 from 0 to 2000 (which is #number_of_timesteps). However, it seems that the variable #number_of_timesteps is always overwritten by the value I fill in for the variable #number_of_timesteps_in_impulse_buildoff, which is currently 50. As such, if I run the script as it is now, the loop would only repeat 50 times.

In short: the variable #number_of_timesteps seems to be overwritten when #number_of_timesteps_in_impulse_buildoff is defined. The variable isn’t overwritten or anything later in the script. Of course I can use a different variable name that isn’t so similar, but I’d still love to know what the exact cause of this problem is, so I can actively avoid it in the future. Is this a known bug, or am I doing something wrong?

Kind regards

“8.2.14 LET - and STO - Variables
One can define variables to be used in the following records. After the leadin LET# (only valid within current program) or STO# (value will be saved to database) the name of the variable is appended directly (up to 16 characters of an alpha-numerical text, 1st character has to be a letter) and an optional index.”

The first 16 characters of your variables are NOT significant

That explains it all, thank you!