feat(tsl-api-reference): index class and unit APIs

Migrate reference pages to declaration-line storage and rebuild the
13-column index.

Add qualified member lookup plus regression and end-to-end coverage.
This commit is contained in:
csh
2026-07-29 15:47:46 +08:00
parent 9edc8fc868
commit 13be5ea0aa
239 changed files with 39157 additions and 12846 deletions
@@ -2,6 +2,8 @@
## `readFile(data_type, alias, file_name, pos, length, data)`
声明:function
将本地的文件读取出来。文件格式可以是字符流、整数流、实数流、字节流等。
| 参数 | 类型 | 说明 |
@@ -27,6 +29,8 @@ return data;
## `fileModeToStr()`
声明:function
文件模式数值转换成文件模式字符串。仅NG客户端中支持。
返回:string
@@ -43,6 +47,8 @@ return ret;
## `zipCompress(zip_alias, zip_filename, alias, filename, path)`
声明:function
将文件压缩到ZIP文件中,如果压缩文件不存在,函数会创建一个。ZIP格式的压缩不支持加密。
| 参数 | 类型 | 说明 |
@@ -66,6 +72,8 @@ zipCompress('', 'd:\\a.zip', '', 'd:\\tmp', 'test');
## `zipExtract(zip_alias, zip_filename, alias, path, password)`
声明:function
将ZIP文件解压到指定目录
| 参数 | 类型 | 说明 |
@@ -87,6 +95,8 @@ zipExtract('', 'd:\\a.zip', '', 'd:\\tmp', '123');
## `rarExtract(rar_alias, rar_filename, alias, path, password)`
声明:function
将RAR文件解压到指定目录
| 参数 | 类型 | 说明 |
@@ -108,6 +118,8 @@ rarExtract('', 'd:\\a.rar', '', 'd:\\tmp', '123');
## `listTable()`
声明:function
返回用户数据的名称列表(一维数组)。
返回:array
@@ -121,6 +133,8 @@ return listTable();
## `loadTable(name, table_type)`
声明:function
提取用户数据,装入用户表,从name指定的位置将数据导出。TableType参数可省略,默认为0;0或省略时表示装入当前用户表,1表示装入系统表,即可导入系统账号system的用户数据。
| 参数 | 类型 | 说明 |
@@ -139,6 +153,8 @@ return loadTable('testA');
## `fileAttrToStr()`
声明:function
文件属性数值转换成文件属性字符串。仅NG客户端中支持。
返回:string
@@ -155,6 +171,8 @@ return ret;
## `strToFileAttr(str)`
声明:function
文件属性字符串转换成文件属性数值。仅NG客户端中支持。
| 参数 | 类型 | 说明 |
@@ -173,6 +191,8 @@ return rdo2 strToFileAttr(str1);
## `strToFileMode(str)`
声明:function
文件模式字符串转换成文件模式数值。仅NG客户端中支持。
| 参数 | 类型 | 说明 |
@@ -191,54 +211,72 @@ return rdo2 strToFileMode(str1);
## `ftCsv()`
声明:function
逗号分割文件类型。
返回:integer
## `ftXls()`
声明:function
Excel文件类型。默认会打开EXCEL来读写文件,如果EXCEL未安装,会尝试用文件读写的模式来访问。
返回:integer
## `ftXls2()`
声明:function
支持多表头的Excel文件类型。
返回:integer
## `ftXls3()`
声明:function
Excel文件类型,默认采用文件读写的方式访问,效率高,兼容性稍差,当文件读写的模式无法正确访问,会打开EXCEL来读写文件。
返回:integer
## `ftStream()`
声明:function
天软对象流文件类型。
返回:integer
## `ftString()`
声明:function
天软对象字符串文件类型。
返回:integer
## `ftXml()`
声明:function
XML文件类型。
返回:integer
## `ftdbf()`
声明:function
dbf文件类型。
返回:integer
## `rwByte()`
声明:function
字节流读写类型。读/写字节数组
返回:integer
@@ -255,48 +293,64 @@ return data1;
## `rwInt()`
声明:function
整数流读写类型。读/写整数数组
返回:integer
## `rwReal()`
声明:function
实数流读写类型。读/写实数数组
返回:integer
## `rwStr()`
声明:function
字符串流读写类型。读/写字符串数组
返回:integer
## `rwObj()`
声明:function
对象流读写类型。读/写对象数组。
返回:integer
## `rwRaw()`
声明:function
原始读写类型。读/写指定长度的字节流。
返回:integer
## `rwBinary()`
声明:function
二进制读写类型。读/写指定长度的字节流。读写的操作使用Binary数据类型。
返回:integer
## `sysClientInfo()`
声明:function
在平台应用可获得客户机信息,这些信息除了客户端收集的有限信息:包括MAC地址/IP/HOSTNAME/操作系统类型以外,还存在其他客户端的信息插件提供的内容,例如一些交易插件会收集交易需要的本地识别码。
返回:array
## `sysExecName()`
声明:function
获得解析器的全路径(包含名称)。
返回:string
@@ -314,6 +368,8 @@ echo sysExecName();
## `pluginPath()`
声明:function
获得解析器的插件目录的全路径(包含名称)。当在WORD里或者EXCEL使用TSL程序的时候,由于宿主程序是WORD,解释器的路径并不在SysExecName下,那么PluginPath的父目录就是解释器的路径。
返回:string
@@ -328,6 +384,8 @@ return rdo2 pluginPath();
## `getlogicdrive()`
声明:function
获取本地逻辑驱动器。
返回:integer
@@ -341,6 +399,8 @@ return rdo2 getlogicdrive();
## `createlink(link_name, target_name, hard)`
声明:function
创建一个目标为TargetName名为LinkName的链接。在Linux系统中用的较多。
| 参数 | 类型 | 说明 |
@@ -371,6 +431,8 @@ return rdo2 createlink("D:\\test\\txt", path, 0); // 创建一个软链接
## `realpath(name)`
声明:function
获取文件真实路径与名称。如果是链接类型文件,或者所处在一个链接目录中,可以得到该文件的真实存贮位置。在Windows上,返回的是一个UNC名称。
| 参数 | 类型 | 说明 |
@@ -410,6 +472,8 @@ return rdo2 realpath(path);
## `exportFile(_type, alias, file_name, data, include_header, include_index)`
声明:function
将数据导出为文件。支持将INF以及NAN导出到ExcelINF对应为EXCEL的DIV0NAN对应为NA
| 参数 | 类型 | 说明 |
@@ -459,6 +523,8 @@ return r;
## `importFile(_type, alias, file_name, data, include_header, include_index, force_single, sheet_name, range)`
声明:function
从文件中导入数据。对EXCEL文件自动识别.xls或者.xlsx的文件格式,支持将INF以及NAN导入
| 参数 | 类型 | 说明 |
@@ -532,6 +598,8 @@ return t;
## `iniWriteBool(alias, file_name, section, ident, value)`
声明:function
将BOOL值写入INI。如果不存在FileName,或者不存在Section,或者不存在Ident,则其会根据输入的FileNameSectionIdent创建对应的INI文件,INI文件的节名称,INI文件的键名称,并将Bool值Value写入到INI文件指定的键
| 参数 | 类型 | 说明 |
@@ -561,6 +629,8 @@ return ret;
## `iniWriteDate(alias, file_name, section, ident, value)`
声明:function
将日期值写入INI。如果不存在FileName,或者不存在Section,或者不存在Ident,则其会根据输入的FileNameSectionIdent创建对应的INI文件,INI文件的节名称,INI文件的键名称,并将日期值Value写入到INI文件指定的键
| 参数 | 类型 | 说明 |
@@ -590,6 +660,8 @@ return ret;
## `iniWriteDateTime(alias, file_name, section, ident, value)`
声明:function
将日期时间值写入INI。如果不存在FileName,或者不存在Section,或者不存在Ident,则其会根据输入的FileNameSectionIdent创建对应的INI文件,INI文件的节名称,INI文件的键名称,并将日期时间值Value写入到INI文件指定的键
| 参数 | 类型 | 说明 |
@@ -619,6 +691,8 @@ return ret;
## `iniWriteFloat(alias, file_name, section, ident, value)`
声明:function
将浮点值写入INI。如果不存在FileName,或者不存在Section,或者不存在Ident,则其会根据输入的FileNameSectionIdent创建对应的INI文件,INI文件的节名称,INI文件的键名称,并将浮点值Value写入到INI文件指定的键
| 参数 | 类型 | 说明 |
@@ -648,6 +722,8 @@ return ret;
## `iniWriteInteger(alias, file_name, section, ident, value)`
声明:function
将整数值写入INI。如果不存在FileName,或者不存在Section,或者不存在Ident,则其会根据输入的FileNameSectionIdent创建对应的INI文件,INI文件的节名称,INI文件的键名称,并将整数值Value写入到INI文件指定的键
| 参数 | 类型 | 说明 |
@@ -677,6 +753,8 @@ return ret;
## `iniWriteTime(alias, file_name, section, ident, value)`
声明:function
将时间值写入INI。如果不存在FileName,或者不存在Section,或者不存在Ident,则其会根据输入的FileNameSectionIdent创建对应的INI文件,INI文件的节名称,INI文件的键名称,并将时间值Value写入到INI文件指定的键
| 参数 | 类型 | 说明 |
@@ -706,6 +784,8 @@ return ret;
## `iniWriteString(alias, file_name, section, ident, value)`
声明:function
将字符串值写入INI。如果不存在FileName,或者不存在Section,或者不存在Ident,则其会根据输入的FileNameSectionIdent创建对应的INI文件,INI文件的节名称,INI文件的键名称,并将字符串Value写入到INI文件指定的键
| 参数 | 类型 | 说明 |
@@ -735,6 +815,8 @@ return ret;
## `iniDeleteKey(alias, file_name, section, ident)`
声明:function
删除INI中的标识符。
| 参数 | 类型 | 说明 |