Cog question
Don M
Posts: 1,652
Why is a +1 added to a cognew statement such as this one from Full Duplex Serial?
okay := cog := cognew(@entry, @rx_head) + 1
Comments
Otherwise the poor coder would have to type:
I personally don't like the practice of adding one to the cog value but I do it anyway so my objects can be used with the ones that do add one.
I think one reason we have so many objects that add one is because Chip doesn't like to type and "if x" is easier to type than "if x == -1
Edit: I think the perferred way to use this is: