Shop OBEX P1 Docs P2 Docs Learn Events
INPUT example from help - won't tokenize — Parallax Forums

INPUT example from help - won't tokenize

John KauffmanJohn Kauffman Posts: 653
edited 2011-03-29 13:19 in BASIC Stamp
Help for INPUT has this example with instructions to test by adding/removing a 10K resistor from +5v to Pin 7.

INPUT 7
DEBUG "state of",Pin7,CR

An output example implies this, too, would work:
INPUT 7
DEBUG "state of",#Pin7,CR

Neither will tokenize. In both cases the error is for "An undefined symbol" on the Pin7 or #Pin7

Any guesses?

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-03-29 10:00
    Don't you need to define Pin7 first?
    Pin7  PIN  7
    
  • John KauffmanJohn Kauffman Posts: 653
    edited 2011-03-29 10:22
    Yes, that works. Thanks, Mike.
    Odd to me that the definition line was not in the Help example.
    The example was a full program: from {$...} directives right down to END
  • vaclav_salvaclav_sal Posts: 451
    edited 2011-03-29 13:19
    John,
    I think you fell into unfortunate and seldom advertized “gotcha” of the BS product.
    The difference between PBASIC version and editor version.
    PIN is defined in PBASIC 2.5 only.
Sign In or Register to comment.