The sequence you outlined:
Tag = 2;
Tag = 500;
nVariableX = 3;
NewVariable = Tag[nVariableX]; // NewVariable = 500
is standard functionality. If you want NewVariable to follow the value of Tag if it changes, then NewVariable needs to be a pointer.
pNewVariable = &Tag[nVariableX]; //pNewVariable will always return the current value of Tag.
you could take it further, but it requires two lines of code…
nVariableX = 2; //nothing happens
pNewVariable = &Tag[nVariableX]; //pNewVariable now returns the current value of Tag
I might still not be understanding correctly what you want, so here’s another example with pointers (might be more useful to just post a picture of a rabbit with a pancake on its head):
Let’s say you have i32’s “nX” and “nY”, and pointer “pA”.
nY = 6;
nX = nY; //nX now equals 6
pA = &nX; //pA now returns 6, referencing nX
nX = 5; //pA now returns 5
*pA = nY; //nX now equals 6
In Page 18 of this document, it looks like this pointer example matches up to the indirect addressing example, so maybe this isn’t too far off…