Page 1 of 1
Stopping a procedure
Posted: Sat Nov 01, 2008 8:15 pm
by Rookie
Since I have been searching for a solution for 30 minutes right and cant seem to put a correct string combo in the search box I asked probably a simple question.
I want to stop a produre from going on once I get to a certain point in a IF statement. Anyway to do this?
Posted: Sat Nov 01, 2008 8:21 pm
by Fluid Byte
Like this?
Code: Select all
Procedure MyFunction(Value)
If Value = 10
ProcedureReturn 0
EndIf
MessageRequester("Notice","This dialog will never show!",64)
EndProcedure
MyFunction(10)
Posted: Sat Nov 01, 2008 8:28 pm
by Rookie
Yep like that. I knew it would be something simple.
Posted: Sun Nov 02, 2008 12:13 am
by Psychophanta
Don't need to return any value, just
ProcedureReturn
is what you need to finish and exit from the procedure.
Posted: Sun Nov 02, 2008 12:53 am
by Fluid Byte
Psychophanta wrote:Don't need to return any value, just ProcedureReturn is what you need to finish and exit from the procedure.
If you don't intend to use inline assembly yes, otherwise no.
Posted: Sun Nov 02, 2008 12:41 pm
by Psychophanta
Fluid Byte wrote:Psychophanta wrote:Don't need to return any value, just ProcedureReturn is what you need to finish and exit from the procedure.
If you don't intend to use inline assembly yes, otherwise no.
Sorry, but nothing to do with inline asm. :roll:
Posted: Sun Nov 02, 2008 1:10 pm
by traumatic
Fluid Byte wrote:Psychophanta wrote:Don't need to return any value, just ProcedureReturn is what you need to finish and exit from the procedure.
If you don't intend to use inline assembly yes, otherwise no.
I get your point (ProcedureReturn returns EAX when no value is given) but it
doesn't matter - Rookie just wants to exit the procedure. Psychophanta is right.