Christopher4187
- 25th July 2012, 17:14
I'm not sure how to do this but I need to compare two or three (could be up to 8) values and whichever one changes, make that new value a different variable. I don't want to use an if/then statement because I need to check a lot of these variables and I'm trying to keep code space at a minimum.
So it would be something like this (This isn't ode, it's just a view on how I want it to work):
PACKET 1: A=10, B=20, C=30 STARTING POINT, NO CHANGE.
PACKET 2: A=10, B=22, C=30 - LIGHT = 22
PACKET 3: A=10, B=22, C=37 - LIGHT = 37
PACKET 4: A=15, B=22, C=37 - LIGHT = 15
PACKET 5: A=15, B=22, C=09 - LIGHT = 09
PACKET 6: A=15, B=22, C=09 - LIGHT = 09
PACKET 7: A=15, B=22, C=09 - LIGHT = 09
PACKET 8: A=03, B=22, C=09 - LIGHT = 03
PACKET 9: A=03, B=21, C=09 - LIGHT = 21
PACKET 10: A=03, B=21, C=24 - LIGHT = 24
Is there a way to do this efficiently?
Is there an easier way?
So it would be something like this (This isn't ode, it's just a view on how I want it to work):
PACKET 1: A=10, B=20, C=30 STARTING POINT, NO CHANGE.
PACKET 2: A=10, B=22, C=30 - LIGHT = 22
PACKET 3: A=10, B=22, C=37 - LIGHT = 37
PACKET 4: A=15, B=22, C=37 - LIGHT = 15
PACKET 5: A=15, B=22, C=09 - LIGHT = 09
PACKET 6: A=15, B=22, C=09 - LIGHT = 09
PACKET 7: A=15, B=22, C=09 - LIGHT = 09
PACKET 8: A=03, B=22, C=09 - LIGHT = 03
PACKET 9: A=03, B=21, C=09 - LIGHT = 21
PACKET 10: A=03, B=21, C=24 - LIGHT = 24
Is there a way to do this efficiently?
Is there an easier way?