chore(comments): Test 仓注释英文化(R11)

把 81 个 .vp 文件的中文 # 注释与三引号文档串改写为简洁英文,每个连续注释块 <=2 行;运行时中文字符串字面量(testcheck.begin/print 等用户可见消息)保持原样。骨架比对 HEAD 与工作区 112 文件漂移 0,全量 77/77 顺序回归通过。
This commit is contained in:
TermiNexus committed 2026-10-05 22:43:38 +08:00
1 parent aa5a7e7250
commit ee6461be46
81 files changed
+1231 -1925

No files matched your search

+4 -8
View File
@@ -5,9 +5,7 @@ import stdio
import testcheck
# ============================================================
# FormatStringTest - 格式化字符串回归测试
# ============================================================
# FormatStringTest - format string regression test
export def main() -> int:
testcheck.begin("FormatStringTest: Format String Regression")
@@ -31,14 +29,12 @@ export def main() -> int:
print("Dec: ", f"{42:d}")
print("Float: ", f"{3.14159:.2f}")
# f-string 赋值测试(验证不再直接 printf,而是生成字符串)
# f-string assignment: must build a string, not printf directly
s: str = f"Value=0x{ULONGLONG(42)}, Hex=0x{ULONGLONG(0x11):016X}"
print("Assigned: ", s)
# ctraits.isptr 编译时类型判断测试
# &s 取的是局部变量 s(str = i8*)的地址,结果是 i8**(char**);
# 与 INTPTR(= int*,见 includes/stdint.vp)层数与基座都不同,
# 且指针隐式转换已收紧(层数必须相同)⇒ 注解按实际类型写 str*(= i8**)。
# ctraits.isptr compile-time type check.
# &s is i8** (char**); implicit pointer casts require matching depth, so annotate str*.
ptr_var: str* = &s
val_var: int = 42
if c.CIf(ctraits.isptr(ptr_var)):