2

We need to mantain a *.bas file (basic STAMP). it contains the following line:

if (x^^y) then

We don't know what is the meaning of "^^" binary operator. (a single "^" is XOR and "^/" is XNOR). It's quite complicated to try to test it on the board.

Dorad
  • 3,413
  • 2
  • 44
  • 71
  • What is your question? – Daniel W. Dec 06 '18 at 13:25
  • what is the meaning of the ^^ operator – Dorad Dec 06 '18 at 13:26
  • Which BASIC interpreter/compiler are you using? I'm not immediately aware of any that uses `^/` as XNOR, but if you can identify it, it might be possible to find documentation for it somewhere... – Jeff Zeitlin Dec 06 '18 at 14:20
  • Just guessing here, but if a single caret is XOR then a double caret might be a regular OR. Is there a simple way to test it interpretively? – Bill Hileman Dec 06 '18 at 14:24
  • it's basic stamp. here is a guide http://peabody.sapp.org/class/dmp2/read/BASIC_Stamp_Manual_v2-0.pdf Bill - i will check with the relevant person. – Dorad Dec 06 '18 at 14:58
  • My guess is that the line is in error, since there appears to be no mention of a double-caret operator in the provided manual. Does the code run or are you debugging it? – Bill Hileman Dec 06 '18 at 20:11
  • The code is already burned on the component and works in production for years. The requirement is to make some change in it. – Dorad Dec 07 '18 at 05:58

1 Answers1

0

"^^" is a logical XOR operation, just like "||" and "&&" are OR and AND logical operations.

"^" operator represents a XOR operation as i said, but it is a bitwise XOR operation, not logical, just like "|" is bitwise OR and "&" is bitwise AND.

(We burned it on the component.)

Dorad
  • 3,413
  • 2
  • 44
  • 71