27220 Parallax Inc, 27220 Datasheet - Page 66

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
The pro will replace that code with:
But what if we wanted to go the other direction, that is, wrap from zero back up to
some number?
Yes, this is possible too. Here’s how:
Can you see what’s happening?
sequence (5) minus one to idx; the net effect is that we end up subtracting one
from idx when modulus is used to remove the whole result of the division.
This is a very handy trick – keep it in your bag.
idx = idx + 1 // 5
idx = idx - 1
IF (idx = 0) THEN
ENDIF
idx = idx + 4 // 5
idx = 4
We’re adding the number of elements in the

Related parts for 27220