marqdo

04-branchok

structure/04-branch.mq.md

Structure

fn · h1main
comment

Italic lines are statements. Branches use +; a head that is only * is the else arm.

bind `x` = 0
branch
arm`x` > 0
call> print text=positive
arm`x` < 0
call> print text=negative
armelse
call> print text=zero
Functions
Variables
  • x int
    0

Execution

zero

Source

---
title: Branch
description: `+` arms; a lone `*` arm is else
---

# main

Italic lines are statements. Branches use `+`; a head that is only `*` is the else arm.

**`x` = 0**

1. `x` > 0
  > print text=positive
2. `x` < 0
  > print text=negative
3. *
  > print text=zero

Variable