更新,可自举

This commit is contained in:
TermiNexus committed 2026-08-27 10:16:28 +08:00
1 parent d6d06b2f1a
commit f087aa88e2
22 files changed
+459 -133

No files matched your search

+12
View File
@@ -4,6 +4,8 @@ import t
# 内置函数(Python 语义,自动与 builtins 关联,无需显式 import)
# ord: 字符 → ASCII 码(int)
# chr: ASCII 码 → 字符(t.CChar)
# min/max: 数值比较取小/大值(double 参数,int/float 实参经
# coerce_to_type 无损提升;返回值由调用侧 coerce 到目标类型)
# ============================================================
def ord(s: t.CChar) -> int:
@@ -11,3 +13,13 @@ def ord(s: t.CChar) -> int:
def chr(i: int) -> t.CChar:
return i
def min(a: double, b: double) -> double:
if a < b:
return a
return b
def max(a: double, b: double) -> double:
if a > b:
return a
return b