Hi, all I have a looping structure, and want to make efficient looping, if I am
now wrong, in the programming langguage there is a macro variable that we can use
directly the content of the memory as a object name, so I give the original code
look like this :
Hi, all I have a looping structure, and want to make efficient looping, if I am now wrong, in the programming langguage there is a macro variable that we can use directly the content of the memory as a object name, so I give the original code look like this :
MaxCount =7;
for (int i=0; i<MaxCount; i++)
{
CreateObjects1("PWT"+i, Colour_1);
CreateObjects1("PWT"+i, Colour_2);
CreateObjects1("PWT"+i, Colour_3);
CreateObjects1("PWT"+i, Colour_4);
CreateObjects1("PWT"+i, Colour_5);
CreateObjects1("PWT"+i, Colour_6);
}
and I want to make a simple looping like this :
MaxCount=7;
for (int i=0; i<MaxCount; i++)
{
CreateObjects1("PWT"+i, &(Colour_+1)) ;
}
the Red Text is what I mean how to make it for macro variable?
Thanks.
rgds bob