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

bar or plus symbol for os_wait events?

Hi folks

The function reference page for RTX tiny os_wait() is slightly confusing.
(http://www.keil.com/support/man/docs/tr51/tr51_os_wait.htm)

It specifies using the bar operator to OR events, but in the example it uses a + symbol.
All other examples of os_wait also use the + operator.

Is there any difference? which one is more correct?

Thanks

PS: Also Im not new, just haven't posted in a really long time but I dont see any login gate for this forum...am I blind?

Parents
  • + often works as an alternative to |, but on the other hand, + often results in egg on the face since + two times creates havoc while an extra | operation doesn't change the result.

    So any example where bit values are combined with + should be reported as bugs. And the responsible developer should be tracked down and teached that what looks like correct code and compiles like correct code may still be totally lousy code.

Reply
  • + often works as an alternative to |, but on the other hand, + often results in egg on the face since + two times creates havoc while an extra | operation doesn't change the result.

    So any example where bit values are combined with + should be reported as bugs. And the responsible developer should be tracked down and teached that what looks like correct code and compiles like correct code may still be totally lousy code.

Children