Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By Electroguard
#55186 The listbox variable branching example works great, so I tried extending the principle to allow conditional branching depending on received udp msgs of [test1] or [test2] etc.

That also works great, but it threw up an awkward usage conflict... the udpbranch [branch] requires terminationg it's subroutine with a 'return' in order to receive another incoming udp msg, but that means that you can't 'wait' in any other subroutines for any other events.

But almost every event other than udp requires a 'wait' - so although a udp msg can cause a 'variable' branch to different subroutines, it can't actually do anything in them which needs to end in a 'wait', else the udpbranch is never returned to for receiving any more udp msgs.

So... would it be possible to somehow modify the udpbranch 'return' into a 'wait' to make it compatible with other event handling?
User avatar
By Mmiscool
#55199 Why not set a flag variable and have the timer branch check every second or so?
User avatar
By Electroguard
#55219
Why not set a flag variable and have the timer branch check every second or so?

Sorry Sir, but I don't understand what is being suggested ... what should the frequently checked variable be flagging up?

The timer instruction itself needs to be sat 'wait'ing for its events, so wouldn't that prevent the udpbranch subroutine issuing a 'return' in order for the udpbranch to start looking again for new incoming udp msgs?