27220 Parallax Inc, 27220 Datasheet - Page 29

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 Elements of PBASIC Style · Page 19
The Elements of PBASIC Style
Like most versions of the BASIC programming language, PBASIC is very forgiving
and the compiler enforces no particular formatting style. So long as the source code
is syntactically correct, it will compile and download to the BASIC Stamp without
trouble.
Why, then, would one suggest a specific style for PBASIC? With millions of BASIC
Stamp microcontrollers sold, and tens of thousands of active users world-wide, it is
very likely that you'll be sharing your PBASIC code with someone, if not co-
developing a BASIC Stamp-based project. Writing code in an organized, predictable
manner will save you – and your potential colleagues – time; in analysis, in
troubleshooting, and especially when you return to a project after a long break.
guidelines
The style guidelines presented here are just that:
.
They have been
developed from style guidelines used by professional programmers using other high-
®
®
level languages such as Java
, C/C++ and Visual Basic
. Use these guidelines as is,
or modify them to suit your needs. The key is selecting a style that works well for
you or your organization and sticking to it.
1. Do It Right the First Time
I'll knock it out now and fix it
Many programmers, especially new ones, fall into the "
later
fix it later
." trap. Invariably, the "
" part never happens and sloppy code makes
its way into production projects. If you don't have time to do it right, when will you
find time to do it again?
Start clean and you'll be less likely to introduce errors in your code. And if errors do
pop up, clean and organized formatting will make them easier to find and fix.
2. Be Organized and Consistent
Using a blank program template will help you organize your programs and establish a
consistent presentation.
The BASIC Stamp Editor allows you to specify a file
template for the File | New function (see Edit | Preferences | Files & Directories...).

Related parts for 27220