My suspicion is kix is very linear & it pops the IF stack as it encounters ENDIFs. Thus when you jump out of an IF structure you leave some hanging. I suspect when the script encounters the end of the routine (STOP or RETURN) it collapses all incomplete IF statements that are localized within that routine. In most instances this should work successfully and give predictable results.

PS. Mike,

If you still have questions feel free to add on to this thread or open a new one.

_________________________
Jack