27297 Parallax Inc, 27297 Datasheet - Page 221

KIT STAMPWORKS WITH BS2-IC

27297

Manufacturer Part Number
27297
Description
KIT STAMPWORKS WITH BS2-IC
Manufacturer
Parallax Inc
Datasheet

Specifications of 27297

Lead Free Status
Contains lead
Product
Microcontroller Accessories
Lead Free Status / Rohs Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
27297SQ
Manufacturer:
NS
Quantity:
4
Power PBASIC · Page 211
Power PBASIC
Before I close, I’d like to share a few things that I think separate Power PBASIC
programmers from the rest of the field. Simple things, really, yet highly effective
and, sadly, usually underutilized. It’s up to you to master or adopt these strategies,
but I think that if you do you will be rewarded for your efforts.
Adopt “The Elements of PBASIC Style”
I know I harp on about this, and I do it for a very good reason: in the 12 years I’ve
been writing programs for BASIC Stamp microcontrollers I find that most
programmers create bugs through sloppy programming practice.
Adopt the
neatness counts
philosophy that
and your programs will have fewer bugs – I know
this from experience.
Be Stingy with Variable Declarations
Many programmers, especially those born after the invention of the personal
computer, have learned programming on platforms with resources far greater than
that of the BASIC Stamp microcontroller, and along the way have never really
worried about managing variable space. These programmers usually don’t take very
long to find that techniques used in their PC programs don’t fly on the BASIC Stamp
(or other small micros).
Analyze your programs and declare variable type as required by the code.
If a
variable has an upper limit of 10, use a Nib, not a Byte or Word as this would simply
be wasting variable space.
Arrays are Implicit – Take Advantage
A question that frequently comes up is, “How can I alias an element of an array?”
The answer is: you can’t – at least when you declare an array like this:
colors
VAR
Byte(3)

Related parts for 27297