Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. int count = 0 ;
  2. for(;;)
  3. {
  4. // do xxxx on array element on every iteration
  5. xxxx( array[count] ) ;
  6.  
  7. if( count == N )
  8. {
  9. count = 0 ;
  10.  
  11. // Do yyyy this every N iterations
  12. yyyy() ;
  13. }
  14.  
  15. count++ ;
  16. }
  17.  
  18. int count = 0 ;
  19. for(;;)
  20. {
  21. // Process whole array on every iteration
  22. for( int i = 0; i < sizeof(array)/sizeof(*array); i++ )
  23. {
  24. xxxx( array[count] ) ;
  25. }
  26.  
  27. if( count == N )
  28. {
  29. count = 0 ;
  30.  
  31. // Do yyyy this every N iterations
  32. yyyy() ;
  33. }
  34.  
  35. count++ ;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement