るりまサーチ

最速Rubyリファレンスマニュアル検索!
72件ヒット [1-72件を表示] (0.014秒)
トップページ > クエリ:int2fix[x]

別のキーワード

  1. socket int
  2. prime int_from_prime_division
  3. _builtin to_int
  4. mkmf convertible_int
  5. option int

ライブラリ

キーワード

検索結果

VALUE INT2FIX(int i) (6100.0)

Fixnum におさまることが自明な整数を Fixnum に変換します。 なお、Fixnum の幅は long の幅 - 1 です。

Fixnum におさまることが自明な整数を Fixnum に変換します。
なお、Fixnum の幅は long の幅 - 1 です。

VALUE rb_ary_new3(long n, VALUE i0, i1, i2, ...) (18.0)

長さ n で要素に i0 i1 i2 …を格納した Ruby の配列を作成し返します。

...n で要素に i0 i1 i2 …を格納した
Ruby の配列を作成し返します。

対応するRubyコード

ary = Array[i0, i1, i2...] または
ary = [i0, i1, i2...]

使用例

VALUE ary;
int i[3] = { 1, 2, 3 };
ary = rb_ary_new3(3, INT2FIX(i[0]), INT2FIX(i[1]), INT2FIX(i[2]));...

VALUE LONG2FIX(long i) (16.0)

INT2FIX と同じです。

...
INT2FIX
と同じです。...

RubyVM::InstructionSequence#to_a -> Array (6.0)

self の情報を 14 要素の配列にして返します。

..., :local_size=>2, :stack_max=>2},
# "<compiled>",
# "<compiled>",
# nil,
# 1,
# :top,
# [:num],
# 0,
# [],
# [1,
# [:trace, 1],
# [:putobject_OP_INT2FIX_O_1_C_],
# [:putobject, 2],
# [:opt_plus, {:mid=>:+, :flag=>256, :orig_argc=>1, :blockptr=>nil}],
# [:dup],
# [:setlocal_OP__WC__0, 2],
# [:...

VALUE rb_catch(const char *tag, VALUE (*proc)(), VALUE data) (6.0)

catch と同等の動作を実行します。

...oo_yield(VALUE a, VALUE b)
{
return rb_yield(b);
}

static VALUE
foo_catch(VALUE obj)
{
return rb_catch("footag", foo_yield, INT2FIX(2));
}

static VALUE
foo_abort(VALUE obj)
{
return rb_throw("footag", Qnil);
}

void
Init_foo(void)
{
VALUE Foo = rb_...

絞り込み条件を変える

void rb_ary_store(VALUE ary, long idx, VALUE val) (6.0)

配列 ary のインデックス idx に val を格納します。idx が範囲を越えるときは Ruby レベルと同じく自動的にサイズが拡張されます。

...を越えるときは
Ruby レベルと同じく自動的にサイズが拡張されます。

対応するRubyコード

ary[idx] = val

使用例

VALUE ary;
int idx;
int n[5] = { 1, 2, 3, 4, 5 };
ary = rb_ary_new();
for (idx=0; idx<5; idx++) rb_ary_store(ary, idx, INT2FIX(n[idx]));...