- Move the Compat-A print prototype into stdlib/ as the official offline bundle with stdlib.json (version 0.1.0 + sha256 content digest). - Add std:<relative> import resolution in the loader with bundle path confinement, extension inference and fail-closed digest verification. - Record the verified version/digest/instance_id in Analysis v2 project.stdlib; stdlib modules get a std:name@version#digest instance id. - Add CLI tests: std:io execution, digest-tamper rejection, missing manifest, Analysis identity, no foreign/plugin calls, and frozen binary hash equality. - Update ADR-0028, specs, status, changelog and evidence. Gate: fmt, clippy -D warnings, 415 tests passed.
36 lines
516 B
Markdown
36 lines
516 B
Markdown
---
|
|
import:
|
|
format: "./format.mq.md"
|
|
text: "./text.mq.md"
|
|
---
|
|
|
|
## 写文本
|
|
|
|
`(文本)`
|
|
|
|
把文本编码为 UTF-8 并写入已授权的 stdout 资源流。
|
|
|
|
**内存 = memory.new(1, 1)**
|
|
|
|
**长度 = text.utf8编码(文本, 内存, 0)**
|
|
|
|
**流 = resource.open("stdio", "stdout", ["write"])**
|
|
|
|
> resource.write(流, 内存, 0, 长度)
|
|
|
|
> resource.close(流)
|
|
|
|
*None*
|
|
|
|
## 写值
|
|
|
|
`(值)`
|
|
|
|
按语言值语义格式化后输出,并追加换行。
|
|
|
|
**文字 = format.显示(值) + "\n"**
|
|
|
|
> 写文本(文字)
|
|
|
|
*None*
|