Is this a cycle?

Is it a cycle, not a cycle, or a cycle, not a cycle? If you count the number of cycles in a program, do you think so?

do {
   ...
}while(0);

I am curious because I am working with someone who has a project that requires him to count the number of cycles in the program.

+4
source share
3 answers

In the C standard C11, chapter §6.8.5, iteration operators are listed

iteration operator:

      while (expression ) statement
      dostatement while (expression ) ;
      for (expression opt ; expression opt ; expression opt) statement
      for ( expression expression opt ; opt expression) statement

do statement while ( expression ) ;, , (), , /.

FWIW, .

, , ( )

, , . "" ( , xxx), , , - , .

+7

, , , . , , , , "" , . , , . : , .

EDIT: , , C: do {...} while (0) - ?

+2
do {
   ...
}while(k);

k, - , k!=0 if k True.

, .

0

All Articles