So I'm trying to mask one value with another such as taking two text values and bitwise anding them.
put 1234530530 into val1
put fileCRC.bin(txtfile) into val2 // this function calcs the CRC of a file.
put val1 bitAnd val2 into val3
Something like the above.
Needing some pointer on primitive data handling.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
I get an error: "bitAnd: error in left operand"
however my CRC value is a mashup of characters in the debugger which is the left operand, and my right operand is a nice looking number.
However the same error if I use binaryEncoding("M",bigNum) and the right operand is a mashup of characters. (I'm assuming this is the binary rep of the number)
-sf
UPDATE:
Got it worked out. Like ukimiku said I had the pseudo correct. A lot of differences between Java and RevTalk.
But there may be an issue with the bitAnd and bitXor commands error messages. They say the left operand, and I figured it was the one before the command. Seems the right operand was the issue. I was using an index and was starting it at 0. This is from Java where arrays are zero based, except when dealing with SQL.
Good now I don't have that little conversion to always do.
Any way once I changed it to start at 1 things started to work.
however my CRC value is a mashup of characters in the debugger which is the left operand, and my right operand is a nice looking number.
However the same error if I use binaryEncoding("M",bigNum) and the right operand is a mashup of characters. (I'm assuming this is the binary rep of the number)
-sf
UPDATE:
Got it worked out. Like ukimiku said I had the pseudo correct. A lot of differences between Java and RevTalk.


Any way once I changed it to start at 1 things started to work.