Skip to content

Conditional execution

Leon Starr edited this page Apr 4, 2022 · 3 revisions

An action or set of actions may or may not execute based on the result of an upstream decision. Scrall provides several ways to handle this situation.

For boolean decisions the familiar if-then-else construct is available in the form of a ? : style ternary operator much like it is in programming languages like C or Python. Consequently, “if”, “then” and “else” are not keywords in Scrall though it is still probably confusing to use those words in variable names. Additionally, boolean scalar variables can be set and named conveniently to explain what a true/false condition actually means. “Cabin going down”, for example. In many situations this solution better reflects the data flow semantics and is easier to read than an elaborate if-then-else construct.

Case/switch based decisions where an enumerated type value enables an action block are handled by the the same ? : syntax used for if-then-else since there’s actually little difference to the decision other than having more than two enabling choices.

Introduction

Model semantics

Flows (as Variables)

Constants and literals

Structure of an activity

Accessing the class model

Data flow


Grammar and parsing notes

Components

Clone this wiki locally