るりまサーチ

最速Rubyリファレンスマニュアル検索!
2478件ヒット [1401-1500件を表示] (0.061秒)

別のキーワード

  1. mkmf try_cpp
  2. mkmf egrep_cpp
  3. kernel egrep_cpp
  4. kernel try_cpp
  5. mkmf cpp_command

ライブラリ

キーワード

検索結果

<< < ... 13 14 15 16 17 ... > >>

Kernel.#srand -> Integer (21107.0)

Kernel.#rand や Random.rand で使用される擬似乱数生成器の種を設定し、古い種を返します。

...
Kernel
.#rand や Random.rand で使用される擬似乱数生成器の種を設定し、古い種を返します。

seed に整数を指定するとその絶対値を乱数の種に設定します。
それ以外の値を指定した場合は seed.to_int が指定されたものとして扱いま...
...与えると、以前の Kernel.#rand の値を再現できます。

seed が省略された時には
現在の時刻やプロセス ID、srand を呼び出した回数、
また可能なら /dev/urandom から読み出したデータなどを元に種を作ります。

@param seed 乱数の種と...
...)

p
rand(6) #=> 3
p
rand(6) #=> 0
p
rand(0) #=> 0.445804380918972
p
rand(0) #=> 0.422248634121701

seeds << srand

p
rand(6) #=> 3
p
rand(6) #=> 3
p
rand(0) #=> 0.938911141393347
p
rand(0) #=> 0.915824970865251

seeds << srand(num)

p
rand(6) #=> 3
p
rand(6) #=> 0
p
rand(0) #=> 0.445804380918972
p
...

Kernel.#srand(seed) -> Integer (21107.0)

Kernel.#rand や Random.rand で使用される擬似乱数生成器の種を設定し、古い種を返します。

...
Kernel
.#rand や Random.rand で使用される擬似乱数生成器の種を設定し、古い種を返します。

seed に整数を指定するとその絶対値を乱数の種に設定します。
それ以外の値を指定した場合は seed.to_int が指定されたものとして扱いま...
...与えると、以前の Kernel.#rand の値を再現できます。

seed が省略された時には
現在の時刻やプロセス ID、srand を呼び出した回数、
また可能なら /dev/urandom から読み出したデータなどを元に種を作ります。

@param seed 乱数の種と...
...)

p
rand(6) #=> 3
p
rand(6) #=> 0
p
rand(0) #=> 0.445804380918972
p
rand(0) #=> 0.422248634121701

seeds << srand

p
rand(6) #=> 3
p
rand(6) #=> 3
p
rand(0) #=> 0.938911141393347
p
rand(0) #=> 0.915824970865251

seeds << srand(num)

p
rand(6) #=> 3
p
rand(6) #=> 0
p
rand(0) #=> 0.445804380918972
p
...

Kernel#JSON(object, options = {}) -> object (21101.0)

第一引数に与えられたオブジェクトの種類によって Ruby のオブジェクトか JSON 形式の文字列を返します。

...を JSON.#parse を用いてパースした結果を返します。
そうでないオブジェクトを指定した場合は、それを JSON.#generate を用いて変換した結果を返します。

@param object 任意のオブジェクトを指定します。

@param options JSON.#parse, JSON....
...ションを指定します。

//emlist[例][ruby]{
require
"json"

JSON('[1,2,{"name":"tanaka","age":19}]')
# => [1, 2, {"name"=>"tanaka", "age"=>19}]

JSON('[1,2,{"name":"tanaka","age":19}]', symbolize_names: true)
# => [1, 2, {:name=>"tanaka", :age=>19}]
//}

@see JSON.#parse, JSON.#generate...

Kernel#cc_command(opt = "") -> String (21101.0)

実際にコンパイルする際に使用するコマンドを返します。

...実際にコンパイルする際に使用するコマンドを返します。

@param opt コンパイラに与える追加のコマンドライン引数を指定します。

@see RbConfig.expand...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (21101.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

...ven +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
p
reprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+
nam...
...' where 'X' is positive integer if the +type+ is
unsigned, or negative integer if the +type+ is signed.

For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGN...

絞り込み条件を変える

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (21101.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

...ven +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
p
reprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+
nam...
...' where 'X' is positive integer if the +type+ is
unsigned, or negative integer if the +type+ is signed.

For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGN...

Kernel#check_sizeof(type, headers = nil) -> Integer | nil (21101.0)

与えられた型のサイズを返します。

...を返します。

型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。

例えば、

require
'mkmf'
check_sizeof('mystr...
...uct') # => 12

である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。

@param type 検査したい型を指定します。

@param headers 追加のヘッダファイルを指定します。...

Kernel#check_sizeof(type, headers = nil) { ... } -> Integer | nil (21101.0)

与えられた型のサイズを返します。

...を返します。

型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。

例えば、

require
'mkmf'
check_sizeof('mystr...
...uct') # => 12

である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。

@param type 検査したい型を指定します。

@param headers 追加のヘッダファイルを指定します。...

Kernel#convertible_int(type, headers = nil, opts = nil) (21101.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

...e integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are passed as preprocessor co...
...nstants to the
compiler using the +type+ name, in uppercase.

* 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X'
is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP,
where 'TYP' is the +type+ name in uppercase with replacing '_t'
suffix with 'T', followed by...
...'=X' where 'X' is the macro name to
convert +type+ to +Integer+ object, and vice versa.

For example, if foobar_t is defined as unsigned long, then
convertible_int("foobar_t") would return "unsigned long", and define
macros:

#define TYPEOF_FOOBAR_T unsigned long
#define FOOBART2NUM U...
<< < ... 13 14 15 16 17 ... > >>