I have a large program that changes the value of a variable, say Var, incrementing or decrementing. At any time when Var = 5 I want to execute a subroutine, say Flag().
What is the “appropriate” way to implement this?
What I have in mind is this:
While True
If Var = 5 then
Flag()
End If
End While
But it looked quite silly.
Create a Sub or a Property, change your variable using it, that way you can check the value.