Minimum time for digital signal reading

I did read it, and you have me scratching my head.
How come it is not constantly cycling the relay if the variable does not exist? In the beginning of coding this, I tied the variables to unused pins but I later found out the code also worked without. The reason for that value decimal 255 is that it is the maximum number a byte address can contain (FF).

When I remove this part that you say does nothing, my code is no longer functioning (I.E. the relay is switched on all the time until the ecusignal comes on, then it turns the other relay on all the time).
I need a flag to know when the relay has already been set, don't care if it is my imaginary digital read variable or some other method. How do you read the integer?