Release 2.7.0: executable handbooks and native user-site workflows
This commit is contained in:
1 parent
aa0c4d0f55
commit
d9aef957f7
562 files changed
+21064
-20387
No files matched your search
@@ -8,12 +8,16 @@ import:
|
||||
|
||||
# main
|
||||
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | None; execute this page's documented steps in order and observe their output or stated effects |
|
||||
|
||||
In the YAML header, nested `import:` with `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**
|
||||
We first **y = [Compute y](utils.add_one(n=41))** for the next step.
|
||||
|
||||
> print text=`y`
|
||||
We now **[Display this step's result](> print text=`y`)**.
|
||||
|
||||
> utils.greet who=Marqdo
|
||||
We now **[Call utils.greet](> utils.greet who="Marqdo")**.
|
||||
@@ -5,13 +5,29 @@ description: Imported by main; italic is return; print for side effects
|
||||
---
|
||||
|
||||
## add_one
|
||||
+ `n`
|
||||
|
||||
*n + 1*
|
||||
| 参数 | 类型 | 默认 | 说明 |
|
||||
|---|---|---|---|
|
||||
| n | any | required | Numeric input advanced or calculated by this example |
|
||||
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | The value explicitly returned below; conditional returns follow the selected branch |
|
||||
Input `n`, used by the steps below.
|
||||
|
||||
After these steps, return *(`n` + 1)*.
|
||||
|
||||
## greet
|
||||
+ `who`
|
||||
|
||||
> print text=Hello, `who`!
|
||||
| 参数 | 类型 | 默认 | 说明 |
|
||||
|---|---|---|---|
|
||||
| who | any | required | Recipient name inserted into the greeting |
|
||||
|
||||
*None*
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | None; this function performs the described effects instead of returning business data |
|
||||
Input `who`, used by the steps below.
|
||||
|
||||
We now **[Display this step's result](> print text="Hello, `who`!")**.
|
||||
|
||||
After these steps, return *None*.
|
||||
@@ -8,12 +8,16 @@ description: frontmatter 导入 bind:路径.mq.md
|
||||
|
||||
# main
|
||||
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | 空值;按顺序执行本页的演示步骤,观察输出或已说明的副作用。 |
|
||||
|
||||
在 YAML 头里写 `导入 工具:工具.mq.md` 可导入同级模块并绑定库名「工具」。
|
||||
|
||||
绑定返回值、打印,再调用问候:
|
||||
|
||||
**`y` = [工具.加一] n=41**
|
||||
我们先**y = [计算并保存 y](工具.加一(n=41))**,供下一步使用。
|
||||
|
||||
> 打印 内容=`y`
|
||||
随后我们**[显示当前步骤的结果](> 打印 内容=`y`)**。
|
||||
|
||||
> 工具.问候 谁=Marqdo
|
||||
随后我们**[执行 工具.问候](> 工具.问候 谁="Marqdo")**。
|
||||
@@ -5,13 +5,29 @@ description: 被 main 导入;斜体为返回;副作用用打印
|
||||
---
|
||||
|
||||
## 加一
|
||||
+ `n`
|
||||
|
||||
*n + 1*
|
||||
| 参数 | 类型 | 默认 | 说明 |
|
||||
|---|---|---|---|
|
||||
| n | any | 必填 | Numeric input advanced or calculated by this example |
|
||||
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | 下文显式返回的计算值或结构化结果;分支存在时遵循实际命中的分支。 |
|
||||
输入`n`,按下方步骤使用这个值。
|
||||
|
||||
完成上述步骤后,返回*(`n` + 1)*。
|
||||
|
||||
## 问候
|
||||
+ `谁`
|
||||
|
||||
> 打印 内容=你好,`谁`!
|
||||
| 参数 | 类型 | 默认 | 说明 |
|
||||
|---|---|---|---|
|
||||
| 谁 | any | 必填 | 要显示在问候中的称呼 |
|
||||
|
||||
*无*
|
||||
| 返回 | 类型 | 说明 |
|
||||
|---|---|---|
|
||||
| result | any | 空值;本函数通过上述操作产生效果,不返回业务数据。 |
|
||||
输入`谁`,按下方步骤使用这个值。
|
||||
|
||||
随后我们**[显示当前步骤的结果](> 打印 内容="你好,`谁`!")**。
|
||||
|
||||
完成上述步骤后,返回*None*。
|
||||
Reference in new issue
Block a user