Shop OBEX P1 Docs P2 Docs Learn Events
PBASIC Programing help — Parallax Forums

PBASIC Programing help

ROBOTMAN1ROBOTMAN1 Posts: 5
edited 2008-12-28 03:44 in Learn with BlocklyProp
Recently i got the What's a microcontroller kit for christmas. My first question is whats the difference between Pbasic and basic?confused.gif············································································································································· ·My second question is what do the commands CR, Cls,Duration,Step,Variable,and dec mean?

Thanks anyone that helps
····································· Robotmanroll.gif

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-12-28 03:43
    "Basic" is the generic term for a family of programming languages.

    "PBasic" is the Parallax Basic variant of basic, customized and expanded with some keywords for use with the Parallax BS2 family of modules.

    You probably should download the Parallax manuals -- especially the PBasic user's guide. Also, the tutorials that came with your kit should walk you through the process of writing a few simple programs and trying them out. That will teach you better than anything else.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-28 03:44
    PBasic stands for Parallax Stamp Basic. It's a dialect of Basic specific to the Stamps. In addition to the regular Basic statements, it has some special statements and other syntax specific to the Stamps and their capabilities. It is integer only, so there's no floating point arithmetic and some of the I/O that doesn't make sense (like INPUT and PRINT) has been dropped.

    CR and CLS are items that can occur in a DEBUG or SEROUT statement for controlling the debug window of the Stamp Editor.

    DEC is what is called a "formatter" like HEX and BIN. These are prefixes to expressions in some I/O statements like DEBUG or SEROUT or SERIN and provide conversions between numbers and strings of characters.

    Step, Duration, and Variable are just placeholders for values. For example, some statements like PAUSE have an expression that follows the statement name that provides a value for the Duration of the statement. "PAUSE 10" causes a pause for 10 milliseconds.
Sign In or Register to comment.