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 );
   }

Parents
  • Thank you for your suggestion. I downloaded it, it is really much better than dev c++.

    I know, it is enough for me to have such an IDE with flexible compiler options for testing/practice purpose. I can easily practice C basics in it.

    While installation, it gives a list of compilers & asks for the default compiler to use. In the list only 2 compilers namely 'GNU GCC Compiler' & 'SDCC Compiler' are marked as available.

    Which one should I use to be more closer to KIEL compiler, or Can I use the Keil compiler which is installed in 'C:\Keil\C51\BIN'

Reply
  • Thank you for your suggestion. I downloaded it, it is really much better than dev c++.

    I know, it is enough for me to have such an IDE with flexible compiler options for testing/practice purpose. I can easily practice C basics in it.

    While installation, it gives a list of compilers & asks for the default compiler to use. In the list only 2 compilers namely 'GNU GCC Compiler' & 'SDCC Compiler' are marked as available.

    Which one should I use to be more closer to KIEL compiler, or Can I use the Keil compiler which is installed in 'C:\Keil\C51\BIN'

Children
  • While installation, it gives a list of compilers & asks for the default compiler to use. In the list only 2 compilers namely 'GNU GCC Compiler' & 'SDCC Compiler' are marked as available.

    Which one should I use to be more closer to KIEL compiler, or Can I use the Keil compiler which is installed in 'C:\Keil\C51\BIN'
    using Keil/SDCC will just bring you back to the worst possible platform for learning (small embedded).
    the advantage of learning on a PC is that you never have to wonder "is it the hardware?" you get immediate results, hello world appear on the monitor instead of being sent through some serial line that may or may not be correctly configured .....

    your desire for 'convenience' worries me a bit there is absolutely nothing 'convenient' about developing small embedded.

    Erik