Files
playbook/skills/tsl-api-reference/references/codegen/dotnet/datawarehouse/wizard-intermediate.md
T
csh 9010829c6d feat(tsl-api-reference): expand and reorganize api catalog
Flatten builtin pages, add third-party and platform scopes, and import financial and data warehouse references.

Keep the existing generated index without rebuilding after signature normalization.
2026-08-10 18:26:24 +08:00

106 lines
2.1 KiB
Markdown

# 数据仓库 / 向导函数 / 中间函数
## `isValidPositiveValue(v)`
声明:function
判断是否为大于0的实数,如果是返回1,否则返回0
| 参数 | 类型 | 说明 |
| ---- | ---- | ---- |
| `v` | int | 实数 |
返回:bool
### 示例
范例01:返回:1
```tsl
returnisValidPositiveValue(1);
// 输出:1
```
## `isValidValue(v)`
声明:function
判断V是否是一个数字类型(整数或者实数),如果是非空实数,则返回1,否则返回0
| 参数 | 类型 | 说明 |
| ---- | ---- | ---- |
| `v` | int | 整数 |
返回:bool
### 示例
范例01:返回:1
```tsl
return isValidValue(10);
// 输出:1
```
## `ratioValueByType(v_1, v_2, type, n)`
声明:function
依据返回类型type,返回初值V1到末值V2的增长/增长率/复合增长率
| 参数 | 类型 | 说明 |
| ------ | ---- | ------------------------ |
| `v_1` | int | 实数,初值 |
| `v_2` | int | 实数,末值 |
| `type` | int | 用户自定义,返回数据类型 |
| `n` | int | 整数,期数或交易天数 |
返回:float
### 示例
范例01:返回:100
```tsl
return RatioValueByType(1, 2, 1, 2);
// 输出:100
```
## `reportValueOfPeriod(exp, beg_report, end_report, report_type, reportvalue)`
声明:function
区间财务数据
| 参数 | 类型 | 说明 |
| ------------- | ------ | ----------------- |
| `exp` | string | 字符串,函数表达式 |
| `beg_report` | int | 整数,开始报告期 |
| `end_report` | int | 整数,截止报告期 |
| `report_type` | int | 整数,报告期类型 |
| `reportvalue` | array | 数组,报告期数据 |
返回:array
## `simplyRatioValue(v_1, v_2)`
声明:function
返回初值V1到末值V2的增长率。若V1<0,则直接返回0
| 参数 | 类型 | 说明 |
| ----- | ---- | ---------- |
| `v_1` | int | 实数,初值 |
| `v_2` | int | 实数,末值 |
返回:float
### 示例
范例01:返回:100
```tsl
return SimplyRatioValue(1, 2);
// 输出:100
```