Sha256: 5af5cd8cbe60295381af1677c464f29af0561780c618b804c7c2fa205a989989

Contents?: true

Size: 617 Bytes

Versions: 77

Compression:

Stored size: 617 Bytes

Contents

.. -*- rst -*-

.. highlightlang:: none

rand
====

名前
----

rand - 乱数を生成する

書式
----
::

 rand([max])

説明
----

groonga組込関数の一つであるrandについて説明します。組込関数は、script形式のgrn_expr中で呼び出すことができます。

rand() 関数は 0 から max の間の疑似乱数整数を返します。

引数
----

``max``

  返値の最大値を指定します。省略した場合は RAND_MAX が指定されたものとみなされます。

返値
----

0 と max の間の数を表すInt32型の値を返します。

例
--
::

 rand(10)
 3

Version data entries

77 entries across 31 versions & 1 rubygems

Version Path
rroonga-3.1.1-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.1.1-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.1.1-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.1.1-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.1.0-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.1.0-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.1.0-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.1.0-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.0.9-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.0.9-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.0.9-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.0.9-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.0.8-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.0.8-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.0.8-x64-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.0.8-x64-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.0.7-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt
rroonga-3.0.7-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.0.6-x86-mingw32 vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/rand.txt
rroonga-3.0.6-x86-mingw32 vendor/local/share/doc/groonga/en/html/_sources/reference/functions/rand.txt