Compare commits

..

3 Commits

Author SHA1 Message Date
95da603a74 doc: Update lua.md fix #956 2025-04-18 22:34:52 +08:00
975ddb3193 doc: Update lua.md #957 2025-04-18 22:29:06 +08:00
ee9a764b8f doc: update README.md 2025-04-17 09:47:35 +08:00
4 changed files with 8 additions and 3 deletions

View File

@ -600,6 +600,7 @@ Quick Reference
非常感谢那些一直支持我开源工作的朋友们。如果您对我的工作感到满意,可以选择在[这里进行赞助](https://wangchujiang.com/#/sponsor)<!--rehype:target=_blank-->。也可以通过下载并使用我开发的 [macOS 应用](https://wangchujiang.com/#/app)<!--rehype:target=_blank-->来支持我。以下是我个人开发的 macOS 应用:
<p style="display: inline-block">
<a target="_blank" href="https://wangchujiang.com/file-sentinel/" title="FileSentinel for macOS"><img align="center" alt="FileSentinel" height="52" width="52" src="./appicon/file-sentinel.png"></a>
<a target="_blank" href="https://wangchujiang.com/focus-cursor/" title="FocusCursor for macOS"><img align="center" alt="FocusCursor" height="52" width="52" src="./appicon/focus-cursor.png"></a>
<a target="_blank" href="https://wangchujiang.com/videoer/" title="Videoer for macOS"><img align="center" alt="Videoer" height="52" width="52" src="./appicon/videoer.png"></a>
<a target="_blank" href="https://wangchujiang.com/key-clicker/" title="KeyClicker for macOS"><img align="center" alt="KeyClicker" height="50" width="50" src="./appicon/key-clicker.png"></a>

BIN
appicon/file-sentinel.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -28,7 +28,7 @@ FROM [--platform=<platform>] <image> [AS <name>]
示例
```dockerfile
FROM ruby:3.4.3
FROM ruby:3.3.0
FROM golang:1.20-alpine3.16 AS build-env
```

View File

@ -197,7 +197,11 @@ t.n = t.n + 1 -- 改变 table
```lua
-- 给多个变量赋值
a, b = 10, 2*a --> a=10; b=20
-- 情况1a 未定义过
a, b = 10, 2*a -- 报错a 是 nil
-- 情况2a 已定义(比如 a=5
a = 5
a, b = 10, 2*a -- 右侧的 a=5结果 a=10, b=10不会报错
```
#### 交换变量
@ -763,7 +767,7 @@ table["sex"] = "boy"
-- 获取 table 的长度
print(#table) -- 3
print(#table) -- 0
-- 如果想要删除一个 table那么可以使用 nil 赋值
table = nil