Skip to content

Core:rangeの説明と演算子リストへのリンクを追加 #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/en/references/std.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Displays a string on the screen.
Accepts string input.

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

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

#### @Core:range(_a_: num, _b_: num): `arr<num>`
Generates a sequence of numbers starting from _a_ and ending in _b_.
Increments by 1 when `a < b`, decrements by 1 when `a > b`.
Returns `[a]` when `a == b`.
Behavior is not defined when `a` and/or `b` is non-integer.

#### @Core:sleep(_time_: num): void
Wait for the specified time (milliseconds).

Expand Down
7 changes: 7 additions & 0 deletions docs/ja/references/std.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ standardを省略してstd定数/関数とも呼ばれています。
文字列の入力を受け付けます。

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

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

#### @Core:range(_a_: num, _b_: num): `arr<num>`
_a_ から始まり _b_ で終わる数値の等差配列を返します。
`a < b`なら1ずつ増え、`a > b`なら1ずつ減ります。
`a == b`であれば`[a]`を返します。
`a`および`b`が非整数であるときの動作は未定義です。

#### @Core:sleep(_time_: num): void
指定時間(ミリ秒)待機します。

Expand Down