47件ヒット
[1-47件を表示]
(0.058秒)
検索結果
先頭5件
-
Bignum
# <<(bits) -> Fixnum | Bignum (18120.0) -
シフト演算子。bits だけビットを左にシフトします。
...シフト演算子。bits だけビットを左にシフトします。
@param bits シフトさせるビット数
printf("%#b\n", 0b0101 << 1) #=> 0b1010
p -1 << 1 #=> -2... -
Fixnum
# <<(bits) -> Fixnum | Bignum (18120.0) -
シフト演算子。bits だけビットを左にシフトします。
...シフト演算子。bits だけビットを左にシフトします。
@param bits シフトさせるビット数
printf("%#b\n", 0b0101 << 1) #=> 0b1010
p -1 << 1 #=> -2... -
Integer
# <<(bits) -> Integer (18120.0) -
シフト演算子。bits だけビットを左にシフトします。
...シフト演算子。bits だけビットを左にシフトします。
@param bits シフトさせるビット数
//emlist[][ruby]{
printf("%#b\n", 0b0101 << 1) # => 0b1010
p -1 << 1 # => -2
//}... -
Array
# pack(template) -> String (38.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...sgn * Inf # ±∞ (positive/negative infinity)
else
NaN # 非数 (not a number)
end
else
fra += 1 << 23 # ゲタ
sgn * fra * 2**(exp-127-23) # 正規化数 (normalized number)
end
//}
: G
ビッグエンディアンの倍精......sgn * Inf # ±∞ (positive/negative infinity)
else
NaN # 非数 (not a number)
end
else
fra += 1 << 52 # ゲタ
sgn * fra * 2**(exp-1023-52) # 正規化数 (normalized number)
end
//}
: p
ヌル終端の文字列へのポイ......82, 117, 98, 121].pack("c*") # => "Ruby"
s = ""
[82, 117, 98, 121].each {|c| s << c}
s # => "Ruby"
[82, 117, 98, 121].collect {|c| sprintf "%c", c}.join # => "Ruby"
[82, 117, 98, 121].inject("") {|s, c| s << c} # => "Ruby"
//}
: 文字列を数値(文字コード)の配列に変換す... -
Array
# pack(template , buffer: String . new) -> String (38.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...sgn * Inf # ±∞ (positive/negative infinity)
else
NaN # 非数 (not a number)
end
else
fra += 1 << 23 # ゲタ
sgn * fra * 2**(exp-127-23) # 正規化数 (normalized number)
end
//}
: G
ビッグエンディアンの倍精......sgn * Inf # ±∞ (positive/negative infinity)
else
NaN # 非数 (not a number)
end
else
fra += 1 << 52 # ゲタ
sgn * fra * 2**(exp-1023-52) # 正規化数 (normalized number)
end
//}
: p
ヌル終端の文字列へのポイ......82, 117, 98, 121].pack("c*") # => "Ruby"
s = ""
[82, 117, 98, 121].each {|c| s << c}
s # => "Ruby"
[82, 117, 98, 121].collect {|c| sprintf "%c", c}.join # => "Ruby"
[82, 117, 98, 121].inject("") {|s, c| s << c} # => "Ruby"
//}
: 文字列を数値(文字コード)の配列に変換す... -
String
# unpack(template) -> Array (38.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...sgn * Inf # ±∞ (positive/negative infinity)
else
NaN # 非数 (not a number)
end
else
fra += 1 << 23 # ゲタ
sgn * fra * 2**(exp-127-23) # 正規化数 (normalized number)
end
//}
: G
ビッグエンディアンの倍精......sgn * Inf # ±∞ (positive/negative infinity)
else
NaN # 非数 (not a number)
end
else
fra += 1 << 52 # ゲタ
sgn * fra * 2**(exp-1023-52) # 正規化数 (normalized number)
end
//}
: p
ヌル終端の文字列へのポイ......82, 117, 98, 121].pack("c*") # => "Ruby"
s = ""
[82, 117, 98, 121].each {|c| s << c}
s # => "Ruby"
[82, 117, 98, 121].collect {|c| sprintf "%c", c}.join # => "Ruby"
[82, 117, 98, 121].inject("") {|s, c| s << c} # => "Ruby"
//}
: 文字列を数値(文字コード)の配列に変換す...