chore(comments): Test 仓注释英文化(R11)
把 81 个 .vp 文件的中文 # 注释与三引号文档串改写为简洁英文,每个连续注释块 <=2 行;运行时中文字符串字面量(testcheck.begin/print 等用户可见消息)保持原样。骨架比对 HEAD 与工作区 112 文件漂移 0,全量 77/77 顺序回归通过。
This commit is contained in:
1 parent
aa5a7e7250
commit
ee6461be46
81 files changed
+1231
-1925
No files matched your search
@@ -8,23 +8,23 @@ def bump(v: char) -> char:
|
||||
|
||||
|
||||
def main() -> int | t.CExport:
|
||||
# 1) char 注解:char = t.CChar = i8(标量内置类型,非指针)
|
||||
# 1) char annotation: char = t.CChar = i8 (scalar builtin, not a pointer)
|
||||
ch: char = 65
|
||||
stdio.printf("1 char annot: %d (expect 65)\n", int(ch))
|
||||
|
||||
# 2) char() 强转 int→char:300 trunc 到 i8 → 44
|
||||
# 2) char() cast int to char: 300 truncates to i8, giving 44
|
||||
big: char = char(300)
|
||||
stdio.printf("2 char cast trunc: %d (expect 44)\n", int(big))
|
||||
|
||||
# 3) 函数返回 char(i8 存储)
|
||||
# 3) Function returns char (stored as i8)
|
||||
nx: char = bump(ch)
|
||||
stdio.printf("3 char return: %d (expect 66)\n", int(nx))
|
||||
|
||||
# 4) 单字符字面量 'Z' 赋给 char(90)
|
||||
# 4) Single-char literal 'Z' assigned to char (90)
|
||||
lit: char = 'Z'
|
||||
stdio.printf("4 char literal: %d (expect 90)\n", int(lit))
|
||||
|
||||
# 5) char 参与算术(i8 与 int 混合提升)
|
||||
# 5) char in arithmetic (i8 promoted when mixed with int)
|
||||
s: int = ch + 1
|
||||
stdio.printf("5 char arith: %d (expect 66)\n", s)
|
||||
|
||||
|
||||
Reference in new issue
Block a user