marqdo

mainok

structure/import/main.mq.md

Structure

importutils:utils.mq.md
fn · h1main
comment

In the YAML header, import utils:utils.mq.md imports a sibling module and binds the library name utils.

comment

Bind a return value, print it, then call greet:

bind `y` = [utils.add_one] n=41
call> print text=`y`
call> utils.greet who=Marqdo
Functions
Variables
  • y int
    42

Execution

42 Hello, Marqdo!

Source

---
title: Cross-file import
description: Frontmatter import bind:path.mq.md
import utils:utils.mq.md
---

# main

In the YAML header, `import utils:utils.mq.md` imports a sibling module and binds the library name `utils`.

Bind a return value, print it, then call greet:

**`y` = [utils.add_one] n=41**

> print text=`y`

> utils.greet who=Marqdo

Variable