WAIT_UNTIL... comparison question
Is this:
Fundamentally the same as this:
or, as I suspect, not.
TO CLARIFY:
In the second segment, the fnACTION_2 will fire ONLY if nACTION_1 = 0, but won't hang around until it is; I suspect it won't fire at all if nACTION_1 suddenly goes from 1 to 0, whereas the top one will. Am I right in that assumption?
Do I even make sense at this hour???
IF( nACTION_1 = 1 ) // REPRESENTING A FLAG INSIDE A FUNCTION fnACTION_1 ()
{
WAIT_UNTIL ( nACTION_1 = 0 ) 'WAIT UNTIL fnACTION_1 IS COMPLETE'
fnACTION_2 ()
}
ELSE
{
fnACTION_2 ()
}
Fundamentally the same as this:
IF( !nACTION_1 )
{
fnACTION_2 ()
}
or, as I suspect, not.
TO CLARIFY:
In the second segment, the fnACTION_2 will fire ONLY if nACTION_1 = 0, but won't hang around until it is; I suspect it won't fire at all if nACTION_1 suddenly goes from 1 to 0, whereas the top one will. Am I right in that assumption?
Do I even make sense at this hour???
0
Comments
The first IF in the first block is a flag inside a function that resets the whole system, so I abolutely don't want the second action to fire while thats happening. If it was a standalone statement I probably wouldnt need it but its part of a series of SELECT...ACTIVES inside a DATA_EVENT that is parsing a buffer...
I guess Im just covering all bases!
Thanks :-)
IF( !nACTION_1 ) { // do something }is the same asIF(nACTION_1<>0 ) { // do something }Any number beside zero will trigger it.