問題
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 輸出始終為英文,因此同一文件的執行在任何機器上都會列印出同樣的文字。