Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flow: add ELSE clause to rules #116

Open
4 tasks
jorgegv opened this issue Feb 12, 2024 · 0 comments
Open
4 tasks

flow: add ELSE clause to rules #116

jorgegv opened this issue Feb 12, 2024 · 0 comments
Assignees

Comments

@jorgegv
Copy link
Owner

jorgegv commented Feb 12, 2024

  • Add ELSE clauses to flow rules, to specify actions that are executed if any of the CHECK conditions are not met.
  • More than one ELSE clause can be specified, the same as DO clauses.
  • All DO clauses are executed when all of the CHECK conditions are met.
  • All ELSE clauses are executed when any of the CHECK conditions are not met.

That is, the conditional (CHECK) parts of the rule are executed as AND conditions, and the action (DO, ELSE) parts of the rule are lists of actions to run in each case.

Example:

BEGIN_RULE
  SCREEN Screen01
  WHEN    ENTER_SCREEN
  CHECK   SCREEN_FLAG 0x01
  CHECK   USER_FLAG 0x02
  DO      DISABLE_BTILE BlackBtile
  ELSE    ENABLE_BTILE BlackBtile
END_RULE

In this example, BlackBtile will be disabled only if SCREEN_FLAG is 0x01 and USER_FLAG is 0x02. And it will be enabled if SCREEN_FLAG is not 0x01 or USER_FLAG is not 0x02.

@jorgegv jorgegv self-assigned this Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant