"myvar" is ~_w~ in your example, right (I'm just hoping that it's not part of the syntax - yucky)?
Also, is there some magical limit to this, or can I do something hideously retarded (if the feature exists, you may as well use it, no?) like this:COPY_EXISTING ~EFFTEXT.2DA~ ~OVERRIDE~
SET_2DA_ENTRY_LATER ~myVar~ 0 2 3 ~14662~
SET_2DA_ENTRY_NOW ~myVar~ ~whereIsThisMagical54ComingFrom~
BUT_ONLY_IF_IT_CHANGES
As the first and only person (I think) to actually find a use for BNOTting values, you know I'm gonna. (Unfortunately, there's not much call to square values or do some other simple arithmetic operations, so bit-shifting remains unused.)
EDIT: oh, and where is the magical 54 coming from. It's been in all your examples here, and I can't figure it out (is it the required column count, some limit, the number of seconds until you explode, etc.).