Hello all,
I would like to know if there's a way to minimise the number of
"IF THEN" in this following (simplified) situation.
(I'm new to picbasic!).
value VAR byte
x VAR byte
y0 VAR byte
y1 VAR byte
y2 VAR byte
y3 VAR byte
.
.
.
y15 VAR byte 'or y VAR byte[16]?
If x = 0 Then y0 = value
If x = 1 Then y1 = value
If x = 2 Then y2 = value
If x = 3 Then y3 = value
... and so forth
So is there a way to modify variable "y" by using the "x" one?
ie: yx, y.x, y[x], ???
Thank you
Bookmarks