From d0d6117176d68b2345d36e81ccdaa447e9caa724 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Tue, 22 Dec 2020 04:08:34 +0100 Subject: Moving to Hugo. --- .../fate_v1/instructions/conditionals/_index.md | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 content/fate_v1/instructions/conditionals/_index.md (limited to 'content/fate_v1/instructions/conditionals/_index.md') diff --git a/content/fate_v1/instructions/conditionals/_index.md b/content/fate_v1/instructions/conditionals/_index.md new file mode 100644 index 0000000..e129b1b --- /dev/null +++ b/content/fate_v1/instructions/conditionals/_index.md @@ -0,0 +1,27 @@ +--- +title: Conditionals +--- +Allow the control of whether to execute instructions or not according to a +computation. Every conditional branch defines its hierarchy level, from the +local variables' point of view. + +### IF +{{< fatecode >}}(if [BOOL] [INSTRUCTION]){{< /fatecode >}} + +Executes `[INSTRUCTION]` if, and only if, `[BOOL]` yields true. + +### IF-ELSE +{{< fatecode >}}(if_else [BOOL] ){{< /fatecode >}} + +Executes `` if `[BOOL]` yields true, but `` if it does not. + +### COND +{{< fatecode >}}(cond ([C0 = BOOL] [I0 = INSTRUCTION]) ... ([CN = BOOL] [IN = INSTRUCTION])){{< /fatecode >}} + +Executes `[II]`, such that `[CI]` is the first listed boolean to yield true. + +### SWITCH +{{< fatecode >}}(switch [T = COMPUTATION] ([C0 = COMPUTATION] [I0 = INSTRUCTION]) ... ([CN = COMPUTATION] [IN = INSTRUCTION]) [DEFAULT = INSTRUCTION]){{< /fatecode >}} + +Executes `[II]`, such that `[CI]` is the first listed computation to be equal +to `[T]`. Executes `[DEFAULT]` if there is no such `[CI]`. -- cgit v1.2.3-70-g09d2