Guest User

Untitled

a guest
Jun 20th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. int i;
  2.  
  3. for(i=0; i<16; i++)
  4. {
  5. someClass.someMethod(i);
  6.  
  7. if(someClass.Test())
  8. {
  9. break;
  10. }
  11. }
  12.  
  13.  
  14.  
  15. if (i == 16)
  16. {
  17. i = 15;
  18. }
  19.  
  20. int j = 15;
  21.  
  22. for(int i=0; i <= j; i++)
  23. {
  24. someClass.array[i];
  25. }
  26.  
  27. // continue on using j, which value hasn't changed
  28.  
  29. for (before; check; after) { body }
  30.  
  31. before
  32. while(check) {
  33. body
  34. after
  35. }
  36.  
  37. for(i=0; i<16; i++)
  38.  
  39. i=0
  40.  
  41. i < 16 // True here, since 0 < 16
  42.  
  43. someClass.array[i]; //0
  44.  
  45. i++
  46.  
  47. i==16
  48.  
  49. i < 16 // False, since i==16
  50.  
  51. i = 0;
  52. while(i < 16) {
  53. someClass.array[i];
  54.  
  55. i++;
  56. } // while
  57.  
  58. int i = 0;
  59. while (1) {
  60. someclass.someMethod(i);
  61. if (i < 15) {
  62. i++;
  63. } else {
  64. break;
  65. }
  66. }
  67.  
  68. int i = 0;
  69. while (true)
  70. {
  71. someclass.array[i];
  72. if (i == 15)
  73. break;
  74. ++i;
  75. }
  76.  
  77. bool flag = false;
  78. for (int i = 0; i < 15; ++i)
  79. {
  80. someClass.someMethod(i);
  81.  
  82. if (someClass.Test())
  83. {
  84. flag = true;
  85. break;
  86. }
  87. }
  88.  
  89. int i;
  90. for (i=0; i<16; i++) {
  91. someClass.someMethod(i);
  92. if (someClass.Test())
  93. break;
  94. }
  95. if (i == 16)
  96. i = 15;
  97.  
  98. if (i == 16) i = 15;
  99. i = (i == 16) ? 15 : i;
  100. i = MAX (15,i); /* where MAX is defined :-) */
  101.  
  102. for(int i=0; i<17; i++)
  103. {
  104. if(i<16)
  105. {
  106. someClass.someMethod(i);
  107. if(someClass.Test())
  108. {
  109. break;
  110. }
  111. }
  112. else if(i==16)
  113. {
  114. i=15;
  115. }
  116. }
  117.  
  118. for(int i = 0; i < myArray.length; ++i){
  119. myArray[i].somemethod();
  120. }
  121. // lastindex = myArray.length-1;
Add Comment
Please, Sign In to add comment