aviaf Posted June 15, 2011 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?
zac23 Posted June 15, 2011 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
smartee Posted June 15, 2011 Posted June 15, 2011 Also "you" don't have to indent your own code, press Ctrl+T in SciTE and watch the magic unfold
monoscout999 Posted June 15, 2011 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
aviaf Posted June 15, 2011 Author Posted June 15, 2011 (edited) Thanks monoscout999, that's what I ended up doing, works perfectly. Cleaner too. Edited June 15, 2011 by aviaf
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