Binary Representation of Variables
Vega256
Posts: 197
Hey Guys,
Lets suppose that I would like to set I/O pins [0..8] to output and in a loop set their states' to some binary number that increments after every cycle of the loop. How would I contain this value in a variable, increment the value in the variable and represent that value as a binary number? I used the (%) sign followed by the variable name but that produces a compile-time error.
Lets suppose that I would like to set I/O pins [0..8] to output and in a loop set their states' to some binary number that increments after every cycle of the loop. How would I contain this value in a variable, increment the value in the variable and represent that value as a binary number? I used the (%) sign followed by the variable name but that produces a compile-time error.
Comments
outa[0..8] := variable++ will also work (as will thousands of other variations).
Basically there is no special binary state, it's just a different way of looking at it (a variable).