This is pretty common for complex variable trickery without if statements and such. This is pretty much saying if Z=0, subtract 1 from Z. If Z isn't 0, Z=0 becomes 0, and Z-1(0 (order of operations is multiply first) is just Z-0, which will leave the variable unchanged. In normal code it would be like:
If not(Z
Z-1->Z
Just another thing to point out, If not(Z[newline]
and (Z=0
have the same amount of tokens, which means you should do (not(Z
instead to save space. Never in ti basic should you really have a =0 because that is 2 tokens for something not( can do in one.