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

never, ever increments

a very, very odd thing....

#define BUFFER_SZ 64
unsigned char sBuf0tail;
sBuf0tail = ((sBuf0tail + 1) % BUFFER_SZ);

.. this increments a circular buffer index just fine.

#define BUFFER_SZ 64
unsigned char sBuf0tail;
sBuf0tail = ((sBuf0tail++) % BUFFER_SZ);

.. this one never, ever increments.

huh? is this some strange quirk of C I have never run into or is this a c51 compiler problem?

Parents Reply Children
No data