diff options
Diffstat (limited to 'doc/docs/zh/doc/README.md')
-rwxr-xr-x | doc/docs/zh/doc/README.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/docs/zh/doc/README.md b/doc/docs/zh/doc/README.md index 850afed..a4e76bb 100755 --- a/doc/docs/zh/doc/README.md +++ b/doc/docs/zh/doc/README.md | |||
@@ -1512,6 +1512,17 @@ const {:a, :b, c, d} = tb | |||
1512 | </pre> | 1512 | </pre> |
1513 | </YueDisplay> | 1513 | </YueDisplay> |
1514 | 1514 | ||
1515 | 你也可以声明全局变量为常量。 | ||
1516 | |||
1517 | ```moonscript | ||
1518 | global const Constant = 123 | ||
1519 | ``` | ||
1520 | <YueDisplay> | ||
1521 | <pre> | ||
1522 | global const Constant = 123 | ||
1523 | </pre> | ||
1524 | </YueDisplay> | ||
1525 | |||
1515 | ## 字面量 | 1526 | ## 字面量 |
1516 | 1527 | ||
1517 | Lua中的所有基本字面量都可以在月之脚本中使用。包括数字、字符串、布尔值和**nil**。 | 1528 | Lua中的所有基本字面量都可以在月之脚本中使用。包括数字、字符串、布尔值和**nil**。 |