SPC Version 0.9.5
Once declared, variables may be assigned the value of an expression using the syntax shown in the code sample below.
There are eleven different assignment operators. The most basic operator, '=', simply assigns the value of the expression to the variable. The other operators modify the variable's value in some other way as shown in the table below.
|=||Set variable to expression|
|+=||Add expression to variable|
|-=||Subtract expression from variable|
|*=||Multiple variable by expression|
|/=||Divide variable by expression|
|%=||Set variable to remainder after dividing by expression|
|&=||Bitwise AND expression into variable|
||=||Bitwise OR expression into variable|
|^=||Bitwise exclusive OR into variable|
|>>=||Right shift variable by expression|
|<<=||Left shift variable by expression|
The code sample below shows a few of the different types of operators that you can use in SPC expressions.