There are tonnes of ways to switch a variable from 0 to 1! Here's another, using conditions in expressions, which is one of my favourite "hidden" features:
m = 1 ? 0 : 1
Conditional expressions work like this: condition ? result_if_true : result_if_false
So as you can see when m is 1 it's set to 0, and vice versa.