The following code blocks assumes that Object1 and Object2 are valid objects, e.g. CMlControls.
Code: Select all
// Variable name conflicts can be resolved using the optional "as" in the declare for. So this is working fine:
declare Integer Color as Color1 for Object1;
declare Integer Color as Color2 for Object2;
Color2 = Color1;
Code: Select all
// You can also define "Color" afterwards, still compiles.
declare Integer Color as Color1 for Object1;
declare Integer Color as Color2 for Object2;
declare Integer Color;
Color2 = Color1;
Code: Select all
// Yet if you define "Color" before, compilation fails
declare Integer Color;
declare Integer Color as Color1 for Object1; // Compilation error: "The variable Color has already been declared in the same bloc."
declare Integer Color as Color2 for Object2;
Color2 = Color1;
I hope it is clear what I want to say, I don't know how to describe it better ^^
[Bug found in Build 27/12/12 19:36, but if I remember right, I already came across it before Beta2, but did not analyzed it any further.]