Shop OBEX P1 Docs P2 Docs Learn Events
Am I having a senior moment? — Parallax Forums

Am I having a senior moment?

trookstrooks Posts: 228
edited 2014-07-25 16:49 in BASIC Stamp
It usually does not happen this early in the day but my brain is obviously fried.

Reference BS Manual page 110
----

BS2 and 2.5.2 editor are specified with usual point and click

next is:

cnt VAR WORD
one CON 1

main:

cnt = cnt + one

I then hit F7 and '=' is highlighted with message "Expected a binary operator or ')'

Does any one know a good brain surgeon or have an explanation for what is going on here?

If the answer makes me look stupid then so be it and I will quit this endeavor.

Comments

  • PublisonPublison Posts: 12,366
    edited 2014-07-24 11:15
    BS@TEST.bs2Works fine here.
  • davejamesdavejames Posts: 4,047
    edited 2014-07-24 11:25
    ...copied code from OP into IDE, punched the two directive buttons, hit F7 and it tokenizes successfully.
  • PublisonPublison Posts: 12,366
    edited 2014-07-24 11:36
    Make sure you didn't hit BS1 as the target device. I have done that on occasion.

    BS1 requires Symbol not VAR
  • PublisonPublison Posts: 12,366
    edited 2014-07-24 11:37
    Greetings Dave!
  • trookstrooks Posts: 228
    edited 2014-07-24 12:23
    Actually it was a senior moment.

    I summarized the code because I still have not figured how to cut and past.

    After my mid-day nap I went back and found a hanging ',' behind a previous DEBUG command. Continuing through the program I found 3 other hanging commas from my latest revision of the code. I consistently use the F7 as I am writing code but forgot to use it when editing.

    Tucking my red face and slinking away.
  • PublisonPublison Posts: 12,366
    edited 2014-07-24 12:29
    trooks wrote: »
    Actually it was a senior moment.

    I summarized the code because I still have not figured how to cut and past.

    After my mid-day nap I went back and found a hanging ',' behind a previous DEBUG command. Continuing through the program I found 3 other hanging commas from my latest revision of the code. I consistently use the F7 as I am writing code but forgot to use it when editing.

    Tucking my red face and slinking away.

    We have all been there, hang in!
  • davejamesdavejames Posts: 4,047
    edited 2014-07-24 13:33
    Publison wrote: »
    Greetings Dave!

    Hey Jim.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-07-24 13:43
    trooks wrote: »
    BS2 and 2.5.2 editor are specified with usual point and click

    Just wanted to point out that 2.5.2 would be the version of the BASIC Stamp Editor Software for Windows while 2.5 is the version of the PBASIC Syntax. When you're clicking the 1.0, 2.0 or 2.5 buttons you're specifying which version of the PBASIC Syntax the editor is to use. 1.0 is only for the BASIC Stamp 1 (BS1) while 2.0 is the default for the BASIC Stamp 2 (BS2). It is purely a coincidence that the current version of the BASIC Stamp Editor Software is 2.5.3(r2). :innocent:

    As a note, you'll want to start most every program by clicking the BS2 and 2.5 icons unless you're using a different model of BASIC Stamp.
  • Dave HeinDave Hein Posts: 6,347
    edited 2014-07-24 13:53
    As a note, you'll want to start most every program by licking the BS2 and 2.5 icons unless you're using a different model of BASIC Stamp.
    That's why I switched from the Stamp to the SX and then to the Prop. I got tired of licking the icons on the screen. :P
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-07-25 08:13
    Dave,

    Guess who was having a senior moment there? :innocent:
  • trookstrooks Posts: 228
    edited 2014-07-25 15:59
    Just wanted to point out that 2.5.2 would be the version of the BASIC Stamp Editor Software for Windows while 2.5 is the version of the PBASIC Syntax. When you're clicking the 1.0, 2.0 or 2.5 buttons you're specifying which version of the PBASIC Syntax the editor is to use. 1.0 is only for the BASIC Stamp 1 (BS1) while 2.0 is the default for the BASIC Stamp 2 (BS2). It is purely a coincidence that the current version of the BASIC Stamp Editor Software is 2.5.3(r2). :innocent:

    As a note, you'll want to start most every program by clicking the BS2 and 2.5 icons unless you're using a different model of BASIC Stamp.


    Chris,

    Thanks for the heads-up.

    Does this mean that the 2.5.2 editor will pass things that might not run on a plain BS2? Are there no reasons to use it anyway?

    Does the editor have no way of knowing what type of BS2 you have it connected to?

    Whenever I am more confused than I usually am I double check the handy manual I keep in the same folder as the editor to verify all commands being used are for the basic BS2. So far I have not written code above the Basic Basic Stamp 2. I do seem to have developed a stutter though.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-07-25 16:49
    The version of editor software is for the most part irrelevant assuming you have an up-to-date version and not a really old version. The newest versions are backward compatible with all BASIC Stamp Modules.

    Also, you asked if the editor had any way to know what type of BASIC Stamp is connected. Got to Run / Identify.
Sign In or Register to comment.