^^ binary operator in basic stamp

We need to mantain an old *.bas file (BASIC stamp) which worked before.
it contains the following line:
if (x^^y) then
We don't know what is the meaning of "^^" binary operator. The person who wrote it doesn't remember also. we know that a single "^" is XOR and that "^/" is XNOR. It's quite complicated to try to test it on the board.

Comments

  • 12 Comments sorted by Date Added Votes

  • Hi

    Download the Basic Stamp Editor and look in Help section.

    or

    Look in the What' a Microcontroller .PDF book.

    https://www.parallax.com/sites/default/files/downloads/28123-Whats-a-Micro-v3.0.pdf
  • I have look in both. couldn't find the "^^"St05P1m.png
  • "^^" is not a valid operator in PBasic. It would not have compiled or run that way in the past.
  • PublisonPublison Posts: 10,474
    edited December 6 Vote Up0Vote Down
    Maybe a cut-paste error in some documentation?

    Posting the code may help fix the error.
    Infernal Machine
  • In fortran, x**y indicates exponentiation. But note: it is in a if/then statement. Try each valid case (<>, <=, >=, etc) and see if any work.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
  • In fortran, x**y indicates exponentiation. But note: it is in a if/then statement. Try each valid case (<>, <=, >=, etc) and see if any work.
    Maybe it's the '<>' operator where the characters have fallen over? :smile:

  • David Betz wrote: »
    In fortran, x**y indicates exponentiation. But note: it is in a if/then statement. Try each valid case (<>, <=, >=, etc) and see if any work.
    Maybe it's the '<>' operator where the characters have fallen over? :smile:

    They would have to have been blown apart since they fell different directions.

    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
  • Maybe it's a bug with its wings folded back?
    Florida, between St. Petersburg and the Gulf of Mexico

    Do not look directly into laser with remaining good eye...
  • dorad,

    What does your program do and how old is it?

    Is there another copy of the program or an old print-out?
  • David Betz wrote: »
    In fortran, x**y indicates exponentiation. But note: it is in a if/then statement. Try each valid case (<>, <=, >=, etc) and see if any work.
    Maybe it's the '<>' operator where the characters have fallen over? :smile:

    They would have to have been blown apart since they fell different directions.

    No no no, they were leaning on each other, then they fell in opposite directions.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • dorad,

    Please post the rest of the program. Maybe we can figure out what's supposed to be there from the context.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Thanks all,
    It was a logical XOR.
Sign In or Register to comment.