Dynamic cases for switch statement (objective c) -


I hope this is a new question (I do not know). My problem is that I want to do something like this in Objective-C:

  switch (indexPath.row) {for (int i = 0; i & lt; value; i ++) {Case i: // break something; }}   

But I found that it is not possible, and clearly found a document that does not compile the program.

Thank you very much for the help

(there are still 2 lines I had forgotten earlier)

It is not possible, case takes only const values ​​

but you use this macro for this purpose #define case (arg) if (__s__ == (arg)) #define __s__ = (s) for SWITCH (int) ;;) #define DEFAULT

Example of use

  int value = 10; For (int i = 0; i    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -