Posted: 15th Jan 2021 10:59
I'm looking through some encyption code kindly supplied by BatVink a while back and can see there's a "~~" in the code (SetMemblockByte(mbMain, n-40,GetMemblockByte(mb, n) ~~ val(mid(cCODE,codeCounter,1)))

What does ~~ mean?!?
Posted: 15th Jan 2021 11:27
I'm not sure why, but I remember something about that turning a FLOAT into an INT.
Posted: 15th Jan 2021 18:38
~~ is the bitwise XOR operator. You can read about bitwise operators at the bottom of this page: https://www.appgamekit.com/documentation/principles/2_operators.htm
Posted: 16th Jan 2021 10:54
Great thanks! I did search the manual.... but ~~ didn't return anything! Ha ha!
Posted: 21st Jan 2021 3:09
It's a tilde ~ not a dash -
Posted: 22nd Jan 2021 12:27
Yes thanks.
Posted: 23rd Jan 2021 19:30
Super useful for toggle switches.

Instead of:
+ Code Snippet
   If XXX = 0 Then XXX = 1 Else XXX = 0


use:
+ Code Snippet
XXX = XXX ~~ 1
Posted: 3rd Feb 2021 11:26
Aaah! Cool! I'll use that!