mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-22 23:11:29 +08:00
Compare commits
3 Commits
renovate/r
...
95da603a74
Author | SHA1 | Date | |
---|---|---|---|
95da603a74 | |||
975ddb3193 | |||
ee9a764b8f |
@ -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
BIN
appicon/file-sentinel.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -197,7 +197,11 @@ t.n = t.n + 1 -- 改变 table
|
||||
|
||||
```lua
|
||||
-- 给多个变量赋值
|
||||
a, b = 10, 2*a --> a=10; b=20
|
||||
-- 情况1:a 未定义过
|
||||
a, b = 10, 2*a -- 报错:a 是 nil
|
||||
-- 情况2:a 已定义(比如 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
|
||||
|
Reference in New Issue
Block a user