I recently used some variable Arrays in a script when i noticed the following behaviour:
having defined some variables
VarM1, VarM2 : double
then i put them into an Array
VarAr : double Array = [VarM1, VarM2]
i expected that when i wrote
VarM1 = 0.5
then the according array index VarAr[0] would contain the same value, because in my variables definition i used this variable VarM1 as the item [0] of the Array.
I thought that VarAr[0] and VarM1 would always have the same content and only the āaddressingā would be a diffrent oneā¦ but as it turned out, the variable VarM1 and the content of the Array VarAr[0] are two completely diffrent things which, during run time, donāt have any relationship anymore.
On my search for an answer i found this statement from @dhj
Which would perfectly explain the described behaviourā¦
(But this still is some kind of confusing for me)