From 61bb3f1c6682dcaa05c67b60d3fd0d50e44e0761 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 24 Feb 2026 18:01:46 +0800 Subject: Fixed issue #246. --- doc/docs/doc/advanced/do.md | 2 +- doc/yue-de.md | 4 +++- doc/yue-en.md | 4 ++-- doc/yue-id-id.md | 4 +++- doc/yue-pt-br.md | 4 +++- doc/yue-zh.md | 4 +++- 6 files changed, 15 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/docs/doc/advanced/do.md b/doc/docs/doc/advanced/do.md index 40fd9fe..4bfcc17 100644 --- a/doc/docs/doc/advanced/do.md +++ b/doc/docs/doc/advanced/do.md @@ -20,7 +20,7 @@ print var -- nil here -YueScript's **do** can also be used an expression . Allowing you to combine multiple lines into one. The result of the do expression is the last statement in its body. +YueScript's **do** can also be used an expression. Allowing you to combine multiple lines into one. The result of the do expression is the last statement in its body. ```yuescript counter = do diff --git a/doc/yue-de.md b/doc/yue-de.md index 0db2bfe..aeaabf1 100644 --- a/doc/yue-de.md +++ b/doc/yue-de.md @@ -15,6 +15,8 @@ do print var -- nil hier ``` +YueScripts **do** kann auch als Ausdruck verwendet werden. So kannst du mehrere Zeilen in einem Ausdruck kombinieren. Das Ergebnis des `do`-Ausdrucks ist die letzte Anweisung im Block. + ```yuescript counter = do i = 0 @@ -34,7 +36,7 @@ tbl = { } ``` -YueScripts **do** kann auch als Ausdruck verwendet werden. So kannst du mehrere Zeilen in einem Ausdruck kombinieren. Das Ergebnis des `do`-Ausdrucks ist die letzte Anweisung im Block. `do`-Ausdrücke unterstützen die Verwendung von `break`, um den Kontrollfluss zu unterbrechen und mehrere Rückgabewerte vorzeitig zurückzugeben. +`do`-Ausdrücke unterstützen die Verwendung von `break`, um den Kontrollfluss zu unterbrechen und mehrere Rückgabewerte vorzeitig zurückzugeben. ```yuescript status, value = do diff --git a/doc/yue-en.md b/doc/yue-en.md index a82ae9a..2cac78a 100644 --- a/doc/yue-en.md +++ b/doc/yue-en.md @@ -15,6 +15,8 @@ do print var -- nil here ``` +YueScript's **do** can also be used an expression. Allowing you to combine multiple lines into one. The result of the do expression is the last statement in its body. + ```yuescript counter = do i = 0 @@ -34,8 +36,6 @@ tbl = { } ``` -YueScript's **do** can also be used an expression . Allowing you to combine multiple lines into one. The result of the do expression is the last statement in its body. - `do` expressions also support using `break` to interrupt control flow and return multiple values early: ```yuescript diff --git a/doc/yue-id-id.md b/doc/yue-id-id.md index d753e20..73bf1bb 100644 --- a/doc/yue-id-id.md +++ b/doc/yue-id-id.md @@ -15,6 +15,8 @@ do print var -- nil di sini ``` +`do` di YueScript juga bisa digunakan sebagai ekspresi, memungkinkan Anda menggabungkan beberapa baris menjadi satu. Hasil ekspresi `do` adalah pernyataan terakhir di badannya. + ```yuescript counter = do i = 0 @@ -34,7 +36,7 @@ tbl = { } ``` -`do` di YueScript juga bisa digunakan sebagai ekspresi, memungkinkan Anda menggabungkan beberapa baris menjadi satu. Hasil ekspresi `do` adalah pernyataan terakhir di badannya. Ekspresi `do` mendukung penggunaan `break` untuk memutus alur eksekusi dan mengembalikan banyak nilai lebih awal. +Ekspresi `do` mendukung penggunaan `break` untuk memutus alur eksekusi dan mengembalikan banyak nilai lebih awal. ```yuescript status, value = do diff --git a/doc/yue-pt-br.md b/doc/yue-pt-br.md index 334e5fc..d48c19b 100644 --- a/doc/yue-pt-br.md +++ b/doc/yue-pt-br.md @@ -15,6 +15,8 @@ do print var -- nil aqui ``` +O **do** do YueScript também pode ser usado como expressão. Permitindo combinar múltiplas linhas em uma. O resultado da expressão do é a última instrução em seu corpo. + ```yuescript counter = do i = 0 @@ -34,7 +36,7 @@ tbl = { } ``` -O **do** do YueScript também pode ser usado como expressão. Permitindo combinar múltiplas linhas em uma. O resultado da expressão do é a última instrução em seu corpo. Expressões `do` suportam usar `break` para interromper o fluxo de execução e retornar múltiplos valores antecipadamente. +Expressões `do` suportam usar `break` para interromper o fluxo de execução e retornar múltiplos valores antecipadamente. ```yuescript status, value = do diff --git a/doc/yue-zh.md b/doc/yue-zh.md index 4585f53..dfc5996 100644 --- a/doc/yue-zh.md +++ b/doc/yue-zh.md @@ -15,6 +15,8 @@ do print var -- 这里是nil ``` +  月之脚本的 **do** 也可以用作表达式。允许你将多行代码的处理合并为一个表达式,并将 do 语句代码块的最后一个语句作为表达式返回的结果。 + ```yuescript counter = do i = 0 @@ -34,7 +36,7 @@ tbl = { } ``` -  月之脚本的 **do** 也可以用作表达式。允许你将多行代码的处理合并为一个表达式,并将 do 语句代码块的最后一个语句作为表达式返回的结果。`do` 表达式支持通过 `break` 打断执行流并提前返回多个值。 +  `do` 表达式支持通过 `break` 打断执行流并提前返回多个值。 ```yuescript status, value = do -- cgit v1.2.3-55-g6feb