objective c - How do I use a boolean operator in a case statement? -


How do I not use the boolean operator just inside a switch statement

  switch ( Expression) {case & gt; 20: Break the statement; Case & lt; -20: Break the statement; }  

Edit : I do not want an (if) statement

  switch ((expression)> 20) {true fact: statements break; Wrong Case: Default: Statement Break; }  

What .. do you want more than 1 boolean in a matter? You can do this

  int ii = ((expression)> 20) + 2 * ((expression) <-20); Switch (ii) {case 1: statement breaks; Case 2: Break the statement; }  

This, IMO is a very bad code, but this is what you asked ...

Just use the statement if you will be better, long time Drive.


Comments

Popular posts from this blog

Indexing in SQL -

multithreading - Do lock objects in Java need to be static? -

objective c - iPhone and it's wireless area -