Select statements XC
-
- Junior Member
- Posts: 4
- Joined: Sat Oct 31, 2015 6:41 pm
Select statements XC
.
Last edited by 5ubject1ve on Thu Jun 04, 2020 11:26 am, edited 1 time in total.
-
- XCore Expert
- Posts: 754
- Joined: Thu Dec 10, 2009 6:56 pm
With a select statement without default case, it will wait for a number of events and then execute the case statement of the first event that fires. If a default case is added, it will only check whether an event was fired when entering the select statement. If no event was fired, the default case will be executed. The execution is not in parallel, thus your assumption is right that you will have to wait for 20 seconds until that long function completes. Please note that the channel operation will only be executed in that case when the select statement is re-entered, for example by using a loop.