-> Hier kostenlos registrieren
Hello all,
I have a little problem and I hope you can help me...
I want to write a little function that can check all the ellements in the array all the time. For ex:
void _CYCLIC ProgramCyclic(void)
int a;
testboolarray : ARRAY[0..5] OF BOOL;
{
for(i=0; i<=5; i++)
{
if(testboolarray == false)
a = 5;
else
a = 10;
}
}
but with this code if ALL the elements of testboolarray are TRUE, only then I will receive a=10.
And I want if ANY element of testboolarray if it is TRUE, then to become a=10.
Can someone help me?
Thanks
I have a little problem and I hope you can help me...
I want to write a little function that can check all the ellements in the array all the time. For ex:
void _CYCLIC ProgramCyclic(void)
int a;
testboolarray : ARRAY[0..5] OF BOOL;
{
for(i=0; i<=5; i++)
{
if(testboolarray == false)
a = 5;
else
a = 10;
}
}
but with this code if ALL the elements of testboolarray are TRUE, only then I will receive a=10.
And I want if ANY element of testboolarray if it is TRUE, then to become a=10.
Can someone help me?
Thanks