View Full Version : Getting Syntax error when I use word PIN

04-29-2006, 07:37 PM
Newbie here.ˇ Just starting with StampWorks Experiment Kit.ˇ Installed latest editor v2.2.5.ˇ
When I enter code for the first experiment:

' ------ [ I/O Definitions ] ----------

AlarmLedˇˇˇˇˇ PINˇˇˇˇˇ 0ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ ' LED on P0

When I run the syntax checker, I get the message:

Expected ':' or end-of-line

and the word PIN is highlighted in blue

It's like it doesn't like the keyword PIN.

It seems that I can avoid using I/O definitions of the type PIN, but that is not in keeping with the "Writing Code like a PRO" style conventions.

What am I doing wrong?

Bruce Bates
04-29-2006, 07:58 PM
Ezra -

Add the following line to the beginning of your program:

'{$PBASIC 2.5}

(note the curley brackets) and that will take care of it. You can also use one of the short-cut buttons at the top of the PBASIC Editor interface to do the same thing. If you mouse-over each button, you will see which one to use. The PIN command was a PBASIC 2.5 addition.


Bruce Bates

<!--StartFragment -->

04-29-2006, 07:59 PM
On the tool bar, click Directive, then select PBasic 2.5.

Sid Weaver
Do you have a Stamp Tester yet?