Skip to content

Commit d9a51e0

Browse files
FineArchstakejohn
andauthored
Core:rangeの説明と演算子リストへのリンクを追加 (#13)
Co-authored-by: Take-John <[email protected]>
1 parent e5e8090 commit d9a51e0

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/en/references/std.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Displays a string on the screen.
2727
Accepts string input.
2828

2929
### :: Core
30+
See [List of operators](./syntax.md#list-of-operators) for operator-equivalent functions.
3031

3132
#### #Core:v
3233
Type: `str`
@@ -38,6 +39,12 @@ Get the type name of the value.
3839
#### @Core:to_str(_v_: any): str
3940
Obtains a string representing a value.
4041

42+
#### @Core:range(_a_: num, _b_: num): `arr<num>`
43+
Generates a sequence of numbers starting from _a_ and ending in _b_.
44+
Increments by 1 when `a < b`, decrements by 1 when `a > b`.
45+
Returns `[a]` when `a == b`.
46+
Behavior is not defined when `a` and/or `b` is non-integer.
47+
4148
#### @Core:sleep(_time_: num): void
4249
Wait for the specified time (milliseconds).
4350

docs/ja/references/std.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ standardを省略してstd定数/関数とも呼ばれています。
2626
文字列の入力を受け付けます。
2727

2828
### :: Core
29+
演算子系関数については[演算子一覧](./syntax.md#演算子一覧)を参照してください。
2930

3031
#### #Core:v
3132
型: `str`
@@ -37,6 +38,12 @@ AiScriptのバージョンです。
3738
#### @Core:to_str(_v_: any): str
3839
値を表す文字列を取得します。
3940

41+
#### @Core:range(_a_: num, _b_: num): `arr<num>`
42+
_a_ から始まり _b_ で終わる数値の等差配列を返します。
43+
`a < b`なら1ずつ増え、`a > b`なら1ずつ減ります。
44+
`a == b`であれば`[a]`を返します。
45+
`a`および`b`が非整数であるときの動作は未定義です。
46+
4047
#### @Core:sleep(_time_: num): void
4148
指定時間(ミリ秒)待機します。
4249

0 commit comments

Comments
 (0)