Message by: LegoLegion 11/29/2001 18:04:31 GMT
icebergs,
I agree with Righteous2. In GENERAL, you probably won't want to use sensor watches.
However, there is one case where they are extremely useful, i.e., for long programs. RISv2.0
has a limit to the number of blocks in a single "stack". I'm not sure what the exact number
is but we have run into the limit a few times. RISv2.0 just says the stack is too long and won't
let you add any more blocks.
To get around this we use a sensor watcher on a variable to switch to a new stack. In pseudo
code it looks like this
Main Stack watch my_variable=1 watch my_variable=2
---------------- ----------------------- ----------------------
set my_variable=0
set my_variable=2 set my_variable=0
set my_variable=1
end
This also makes long programs somewhat easier to read since the individual stacks represent
major segments of the mission the program is trying to accomplish.
jps for LegoLegion