27220 Parallax Inc, 27220 Datasheet - Page 225

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
When would you use */ versus **? When your fractional result is greater than one,
*/ is usually the operator of choice. When the fractional value is less than one then
** will give the best resolution.
To use */, multiply the fractional value by 256 and use this as the operand for */.
Then…
When you need to multiply by a value less than one, especially very small values, the
** operator is best. When using ** you multiply your fractional value by 65536 and
use that result as the ** operand.
Master the Modulus (//) Operator
Modulus is very simple to use, yet I still see lots of programmers doing this:
Why? Isn’t this version simpler?
Rollover is easy, what about rolling under (from zero back to some maximum).
That’s easy too:
This looks different, but behaves just like:
Pi
area = radius * radius */ Pi
scale = rawInput ** 25
count = count + 1
IF (count = 10) THEN
ENDIF
count = (count + 1) // 10
count = (count + 9) // 10
IF (count < 0) THEN
ELSE
ENDIF
count = 0
count = count – 1
count = 0
CON
$0324
' x 0.00038146

Related parts for 27220