📝 docs(tsl): restructure agent-facing reference

Rework TSL syntax, catalog, modules, and routing docs around deterministic agent lookup and generation.

Split large catalog pages into focused function fact pages, remove obsolete pending/verified/unavailable paths, and update consistency tests for the new structure.
This commit is contained in:
csh
2026-06-09 17:24:30 +08:00
parent 9c194170a1
commit 540b3c0a1b
192 changed files with 32929 additions and 13533 deletions
+23 -96
View File
@@ -1,107 +1,34 @@
# 系统相关函数
这一页只负责函数定位:先按主题找到模块,再在页内搜索函数名。
文档类型:函数事实路由页
是否可直接用于生成代码:是;进入分类详情页后按函数事实条目生成调用
遇到不确定时:回到 [../index.md](../index.md)、[../../syntax/index.md](../../syntax/index.md)
## 候选函数索引说明
- 本页是候选函数索引,只说明函数名被归入当前模块。
- 候选名没有进入 verified 函数页前不能当成可调用事实。
- 生成代码前必须先查 [../verified/index.md](../verified/index.md);只从 verified 函数页读取参数类型。
## 使用方式
- 返回总目录:[catalog/index.md](index.md)
- 需要基础语法时回到 [../../syntax/index.md](../../syntax/index.md)
- 需要金融任务组织方式时回到 [../../finance/index.md](../../finance/index.md)
这一页是系统相关函数的轻量入口,不直接承载全部函数事实。生成函数调用时,先按分类目录进入详情页,再只读取命中的函数条目和参数表。
## 模块范围
- 说明:数据类型、表达式调用、性能与运行时能力
- 主题数:9
- 函数数:57
- 函数事实数:60
## 主题目录
## 智能体检索规则
### 数据类型函数
1. 用户只描述能力时,先按“分类目录”选择候选详情页。
2. 用户给出函数名时,优先在 `system/` 子目录中搜索三级函数标题。
3. 只读取命中的函数条目、相邻分类标题和必要参数表;不要把同页其它函数混进当前调用。
4. 没有命中函数事实条目时,不要发明函数名;回到 [../index.md](../index.md) 或项目实际代码确认。
- `DataType`
- `ifInt`
- `ifInt64`
- `ifReal`
- `ifNumber`
- `ifString`
- `ifArray`
- `ifNil`
- `ifExp`
- `ifGraph`
- `ifGraphGroup`
- `ifBinary`
- `ifMatrix`
- `ifObj`
- `GetOleObject`
- `CreateComObject`
- `CreateMatrix`
- `MatrixToArray`
- `GetMatrixFields`
- `CreateBinary`
- `ConvertDataToBuf`
- `ConvertBufToData`
## 分类目录
### 数据类型函数 / None类型
- `ifNone`
- `GetNone`
### 数据类型转换函数
- `Integer`
- `Int64`
- `Real`
- `String`
- `WideString`
- `Binary`
- `SetPrecision`
- `ToSTM`
- `ToSTN`
- `ToXML`
- `XML`
- `ExportCsv`
- `ImportCsv`
### 复制函数
- `dupValue`
### 随机函数
- `randomize`
- `random`
- `RandomFrom`
### 条件选择函数
- `IfThen`
- `IfThen3`
### 表达式相关函数
- `Eval`
- `Call`
- `CallInArray`
- `Invoke`
- `Invokeinarray`
- `SafeEval`
- `DoubleVariableExecute`
- `MultipleExecute`
- `SingleVariableExecute`
- `SafeSetSysParam`
### 性能优化相关函数
- `SetProfiler`
- `GetProfilerInfo`
### 函数库路径
- `sysgettsllibpath`
- `syssettsllibpath`
| 分类 | 详情页 | 函数事实数 |
| ---------------- | ------------------------------------------------------------ | ---------: |
| 数据类型函数 | [system/01_data_type.md](system/01_data_type.md) | 27 |
| 数据类型转换函数 | [system/02_type_conversion.md](system/02_type_conversion.md) | 13 |
| 复制函数 | [system/03_copy.md](system/03_copy.md) | 1 |
| 全局缓存函数 | [system/04_global_cache.md](system/04_global_cache.md) | 4 |
| 随机函数 | [system/05_random.md](system/05_random.md) | 3 |
| 条件选择函数 | [system/06_conditional.md](system/06_conditional.md) | 1 |
| 表达式相关函数 | [system/07_expression.md](system/07_expression.md) | 5 |
| 性能优化相关函数 | [system/08_profiler.md](system/08_profiler.md) | 2 |
| 函数库路径 | [system/09_tsl_lib_path.md](system/09_tsl_lib_path.md) | 3 |
| 错误与断言函数 | [system/10_error_assertion.md](system/10_error_assertion.md) | 1 |