Hello kdoske, welcome to the forum. This is an awsome place for help.

As far as your question, I do it in my programs without any problems. I'm quite sure it's OK to do however in your snippett I believe you should have a RETURN after the ENDIF incase your IF FLAG0 = 0 THEN statement doesn't execute, unless there's more after the ENDIF you didn't show.

Hope this helps.