Long Ifs...
Monkey Archive Forums/Monkey Discussion/Long Ifs...
| ||
Quick question , when I am sitting with a long if statement, and a ton of ands flung in for good measure whats the method for splitting the line up so it looks neater. I thought it was something like. if x=1 .. and z=2 .. and y=3 then do something. end if or something like that. bit vague on the finer points of it hence my post. |
| ||
http://www.monkeycoder.co.nz/Community/post.php?topic=1491&post=13618If x = 1 And z = 2 And y = 3 Do Something End |
| ||
with out the else you can split it.if x = 1 and z = 2 if y = 3 do something endif endif but that would totally fail with an else. |
| ||
If (x + y + z) = 6 do something EndIf ;D |
| ||
that might cause problems Jim! There are many combinations that add up to 6 ;) |