patrickokeeffe Posted August 5, 2010 Share Posted August 5, 2010 An elseif statement would nicely complement the if/else/endif structure. Link to comment Share on other sites More sharing options...
AzeoTech Posted August 5, 2010 Share Posted August 5, 2010 The daqfactory switch statement acts just like a series of if elseif statements. Link to comment Share on other sites More sharing options...
AzeoTech Posted August 5, 2010 Share Posted August 5, 2010 And you can always do else if, but the if needs to be on a new line and has to have a matching endif. Switch is a better choice. Link to comment Share on other sites More sharing options...
SteveMyres Posted August 6, 2010 Share Posted August 6, 2010 Yeah, I realized I had about four if's nested and all but the innermost one only did something on the if (no else), and the innermost had both cases. I thought "Hey, that's a switch/case, with the else in the innermost if as the default!" So now it is! Fortunately you support empty case's. Link to comment Share on other sites More sharing options...
AzeoTech Posted August 6, 2010 Share Posted August 6, 2010 Empty case? Why would you need that? Link to comment Share on other sites More sharing options...
SteveMyres Posted August 6, 2010 Share Posted August 6, 2010 When there's a non-null [almost] default and you want to peel off some other cases first. Link to comment Share on other sites More sharing options...
SteveMyres Posted August 6, 2010 Share Posted August 6, 2010 Though maybe I should go back and see if I can reorder and eliminate the empty cases. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.