greyday01 Posted March 18, 2023 Share Posted March 18, 2023 If you are checking for half a dozen or so conditions on an event would you use nested if / then's or a long if with multiple and checks on the same line? This won't be running continuously or even frequently so speed would not be really an issue. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 18, 2023 Share Posted March 18, 2023 Nesting might be easier with regards to testing. You would be able to return notification or trace statements at each valid condition. Thus finding out if a particular condition doesn't yield the results expected. After testing, switching to a multi-line (separated by / ) may be easier to see what is intended to happen after having put the project down for some time. Link to comment Share on other sites More sharing options...
scorrp10 Posted March 19, 2023 Share Posted March 19, 2023 I would say, split it into multiple lines if ( condition1 && \ condition2 && \ condition3 && \ condition4) ... endif Link to comment Share on other sites More sharing options...
greyday01 Posted March 19, 2023 Author Share Posted March 19, 2023 Thank you. I never knew about the backslash to make a single line of script be split among several lines. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 19, 2023 Share Posted March 19, 2023 Thanks for the example scorrp10. I was clearly not thinking and indicated the wrong slash to use... Link to comment Share on other sites More sharing options...
Recommended Posts