问题
Dhole 从不因为一个问题而停止。读不懂的行会被略过,或者尽可能读取其中有意义的部分,其他内容照常绘制;每个问题都以一行文字说明 —— 它在哪里、哪里有误,以及应改写成什么:
Line 3, column 33: (warning) 'rond' is not something a step can be. Write 'round' if that is what you mean.
行号和列号都从 1 开始计数,列号指向出错内容的第一个字符。
在哪里显示
- Draw Dhole 的 Problems 输出包含这些问题,每行一个,按文本中各行的顺序排列;没有问题时为空。Mistakes 示例通过 Print Line 将它们打印出来。
- Write Dhole 的卡片会在你输入时将它们列在图片下方,使用 Divooka Compute 当前设置的语言。
- 在代码中,
Dhole.Read以DholeProblem的形式给出它们,包含行、列、长度、消息和提示,可以是英文或中文;Dhole.Check则只给出问题而不进行绘制。


错误和警告
错误是指 Dhole 无法按所写内容绘制的行:它会被略过,或者按可读的部分尽可能绘制。警告(其所在行标有 (warning))是指 Dhole 按自己的理解绘制了该行,但这很可能并非作者本意。如果文本的每一行都有误,就什么也不会绘制,Draw Dhole 会失败,并以第一个问题作为其消息。
下面这段文本有四处错误:
flowchrt Ten minutes to fix
direction: sideways
Wake up -> Shower -> Breakfast [rond]
-> Leave
Breakfast -> Leave: on time
Dhole 会绘制它能读懂的部分 —— 一张包含四个步骤的流程图,因为 flowchrt 是 flowchart 的笔误 —— 并说明其余问题:
Line 1, column 1: 'flowchrt' is not something Dhole draws, so this is drawn as a flowchart. Write 'flowchart' if a flowchart is what you mean.
Line 2, column 12: 'sideways' is not a direction. Write down, right, up or left.
Line 3, column 33: (warning) 'rond' is not something a step can be. Write 'round' if that is what you mean.
Line 4, column 1: The arrow comes from nothing. Write what the arrow starts at before it.

笔误
如果某个单词是 Dhole 所知单词的笔误 —— 根据单词长度相差一两个字母,或两个字母位置颠倒 —— Dhole 会给出它很可能想写的那个词:种类(flowchrt)、特性(rond、dimond)、图表数据中的设置(titel: Sales)。不会被误解的 Mermaid 写法会被直接读取而不会被指出 —— 参见 Dhole 与 Mermaid —— 而那些会被画错的写法则会被指出,并给出 Dhole 的写法:写在竖线之间的标签(A -->|yes| B)、该种类不支持的箭头(-.->、--x)。
所有问题
表中尖括号内的词代表文本中实际写的内容。下表“提示内容”和“补充说明”两列引用的是程序输出的英文原文。
| 问题 | 类别 | 提示内容 | 补充说明 |
|---|---|---|---|
| 空文本 | 错误 | There is nothing to draw. | Start with what to draw, such as flowchart, and write what it shows on the lines after. |
| 第一个单词不是任何种类 | 错误 | '‹word›' is not something Dhole draws. | Start with one of: flowchart, sequence, … |
| 拼错的种类 | 错误 | '‹word›' is not something Dhole draws, so this is drawn as a ‹kind›. | Write '‹word›' if a ‹kind› is what you mean. |
| 设置写了两次 | 警告 | ‹setting› was set before; the later setting is used. | Keep one of the two lines. |
| 设置没有值 | 错误 | ‹setting› needs a value after the colon. | Write the value after the colon, or remove the line. |
| 制表符和空格混用 | 警告 | This line is indented with tabs and spaces together; a tab counts as four spaces. | Indent with spaces only, or with tabs only. |
| 未知主题 | 错误 | There is no theme called '‹name›'. | The themes are: … |
| 无效的方向 | 错误 | '‹word›' is not a direction. | Write down, right, up or left. |
| 无效的尺寸 | 错误 | '‹text›' is not a size. | Write the width and the height in pixels, such as 800 x 600. |
| 既非开也非关的开关 | 错误 | '‹word›' is neither on nor off. | Write on or off; yes and no mean the same. |
| 无效的数字 | 错误 | '‹text›' is not a number. | Write a number with a dot for its decimals, such as 12.5. |
| 无效的范围 | 错误 | '‹text›' is not a range. | Write the lowest and the highest value with two dots between them, such as 0..100. |
| 无效的日期 | 错误 | '‹text›' is not a date. | Write a date as year-month-day, such as 2026-11-02, with a time after it if you need one: 2026-11-02 14:30. |
| 无效的时长 | 错误 | '‹text›' is not a length of time. | Write a number of days, weeks or hours, such as 3d, 2w or 4h. |
| 无效的选项 | 错误 | '‹word›' is not one of the choices for ‹setting›. | Write one of: … |
| 引号未闭合 | 错误 | The quotation mark is not closed. | End the quoted name with another quotation mark. |
| 方括号未闭合 | 错误 | The [ is not closed. | End the list in brackets with ]. |
| 缺少名称 | 错误 | A name is missing here. | Write a name, or put one in quotation marks. |
| 未知特性 | 警告 | '‹word›' is not something ‹a step› can be. | It can be: … |
| 拼错的特性 | 警告 | '‹word›' is not something ‹a step› can be. | Write '‹word›' if that is what you mean. |
| 拼错的设置 | 错误 | '‹word›' is not a setting, and its value is not a number, so this line is left out. | Write '‹setting›' if that is the setting you mean. |
| 箭头没有起点 | 错误 | The arrow comes from nothing. | Write what the arrow starts at before it. |
| 箭头没有终点 | 错误 | The arrow points at nothing. | Write what the arrow goes to after it. |
| 该种类不支持的箭头 | 错误 | '‹arrow›' is not an arrow ‹a flowchart› has, so this line is left out. | The arrows are: … |
| 写在竖线之间的标签 | 错误 | A label goes after a colon at the end of the line, not between bars, so this line is left out. | Write it as A --> B: yes. |
| 缩进在空内容下方 | 警告 | This line is indented under a line that holds nothing, so it is read as if it were not indented. | Remove the indentation, or indent it under a group. |
| 空分组 | 警告 | '‹group›' holds nothing. | Indent what belongs to it under it. |
| 类之外的成员 | 错误 | This member belongs to no class. | Indent it under the class it belongs to. |
| 实体之外的属性 | 错误 | This attribute belongs to no entity. | Indent it under the entity it belongs to. |
| 任何一端都不可能出现的计数 | 错误 | '‹text›' is not a cardinality. | Write 1, 0..1, 1..* or * at each end of the line, such as 1-*. |
| 状态图之外的星号 | 错误 | A start or an end belongs to a state machine, not to ‹a flowchart›. | Use * only in a state diagram. |
| 没有放置位置的注释 | 错误 | A note needs a place to go. | Write note over A, note left of A or note right of A, then a colon and the note. |
| 没有箭头的消息 | 错误 | A message goes from one participant to another with an arrow. | Write it as Alice -> Bob: Hello, or Bob --> Alice: Hi for a reply. |
| 没有 if 的 else | 错误 | 'else' belongs straight after an 'if' block. | Put it at the same indentation as its 'if', after the lines indented under that. |
| 没有 par 的 and | 错误 | 'and' belongs straight after a 'par' block. | Put it at the same indentation as its 'par', after the lines indented under that. |
| 消息下方的缩进行 | 警告 | '‹line›' holds lines indented under it but is not a block. | A block starts with loop, if, else, opt, par, and, critical or break. |
| 多个中心 | 警告 | A mind map grows from one centre; the lines at the top after the first are drawn as its branches. | Indent them under the first, or give the map a title to be its centre. |
| 没有时间的事件 | 错误 | This event has no time. | Write the time, a colon, then the event: 1969: The Moon landing. |
| 在未知任务之后开始的任务 | 错误 | There is no task called '‹name›' to start after. | Name a task written in the chart, as it is written. |
| 没有起点的任务 | 错误 | '‹task›' has no date to start from. | Give it a date, or write a start: setting such as start: 2026-11-02. |
| 等待自身的任务 | 错误 | '‹task›' waits for itself through the tasks it starts after. | Let one of those tasks start on a date instead. |
| 结束早于开始的任务 | 错误 | '‹task›' ends before it starts. | Give it an end after its start, or a length. |
| 重名的任务 | 警告 | There is already a task called '‹task›'. | Give each task a name of its own, so 'after' knows which is meant. |
| 没有数据 | 错误 | There is no data to draw. | Write a line for each value: a name, a colon, then the value. |
| 值与标签数量不匹配 | 警告 | '‹series›' has ‹n› values for ‹m› labels. | Give it one value for each label. |
| 不大于零的扇区或流 | 警告 | '‹name›' is not above zero, so it has no slice. | Give every slice an amount above zero. |
| 无效的数据点 | 错误 | '‹text›' is not a point. | Write a point as two numbers in brackets, such as (3, 4.5). |
| 超出范围的数据点 | 警告 | '‹point›' lies outside the chart's range, so it is drawn at its edge. | Change its value, or the range: setting. |
| 单值与多值混用 | 警告 | '‹kind›' mixes lines with one value and lines with several. | Write every line with one value, or every line with a value for each label. |
| 没有数量的流 | 错误 | A flow needs an amount. | Write the amount after a colon: Coal -> Power: 25. |
| 形成循环的流 | 错误 | The flows go round in a circle through '‹node›', and a Sankey diagram flows one way. | Remove one of the flows that lead back. |
| 长度不对的行 | 警告 | This row has ‹n› cells and the header has ‹m›. | Give every row a cell for each column. |
| 无法绘制的示意图 | 错误 | This ‹kind› could not be drawn: ‹why› | Simplify the lines it is drawn from; the text up to here is read as written. |
| 分隔线之间没有内容 | 警告 | There is nothing between these separators. | Remove one of the --- lines, or write a diagram between them. |
中文提示
每个问题也都有中文措辞;当 Divooka Compute 设置为中文时,Write Dhole 的卡片会以中文显示它们:
第 3 行第 7 列:“lots”不是数字。请写数字,小数用点表示,例如 12.5。
Draw Dhole 的 Problems 输出始终为英文,因此同一文档的运行在任何机器上都会打印出同样的文字。