aviaf Posted June 15, 2011 Share Posted June 15, 2011 I was thinking of using goto,but sinc ethat doesn't exist, is there any way to skip a large chunk of code if a condition is satisfied without using an IF Then Else EndIf? Just because the chunk I'm skipping is pretty big and I'll have to indent everything one tab further in between, right? Link to comment Share on other sites More sharing options...
zac23 Posted June 15, 2011 Share Posted June 15, 2011 Just because the chunk I'm skipping is pretty big and I'll have to indent everything one tab further in between, right?Nope, the indenting is only for looks and readability Link to comment Share on other sites More sharing options...
smartee Posted June 15, 2011 Share Posted June 15, 2011 Also "you" don't have to indent your own code, press Ctrl+T in SciTE and watch the magic unfold Link to comment Share on other sites More sharing options...
monoscout999 Posted June 15, 2011 Share Posted June 15, 2011 My opinion... use If $bla = true Then _DefaultFunction() Else _AlternativeFunction() EndIf Func _DefaultFunction() msgbox(0,"Whaaja", "Everything is gona be all right") EndFunc Func _AlternativeFunction() msgbox(0,"oops","Alternative way") EndFunc Link to comment Share on other sites More sharing options...
aviaf Posted June 15, 2011 Author Share Posted June 15, 2011 (edited) Thanks monoscout999, that's what I ended up doing, works perfectly. Cleaner too. Edited June 15, 2011 by aviaf Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now