This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Meaning of operator %=

Hello everybody,

I have seen the operator %= used in a code meant for Keil C. Can somebody explain me its purpose? Thanks.

www.8051projects.net/.../forum_viewtopic.php

char getchar()
   {
   volatile char c;

   while(RxInChar == RxOutChar);
   ES = 0;                         /* Disable Interrupts */
   c = RxBuffer[ RxOutChar++ ];
   RxOutChar %= BUF_SIZE;
   ES = 1;                         /* Enable Interrupts */

   return( c );
   }

0