るりまサーチ

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

別のキーワード

  1. _builtin to_h
  2. env to_h
  3. hash to_h
  4. struct to_h
  5. array to_h

ライブラリ

モジュール

検索結果

Kernel.#putc(ch) -> object (18244.0)

文字 ch を 標準出力 $stdout に出力します。

...字 ch を 標準出力 $stdout に出力します。

ch が数値なら 0 〜 255 の範囲の対応する文字を出力します。
ch が文字列なら、その先頭1文字を出力します。
どちらでもない場合は、ch.to_int で整数に変換を試みます。

@param ch 出力...
...する文字です。数または文字列で指定します。
@return ch を返します
@raise RangeError Bignum を引数にした場合に発生します。
@raise IOError 標準出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗...
...きないオブジェクトを引数に
指定した場合に発生します。

//emlist[例][ruby]{
putc
("ch")
putc
(?c)
putc
(99)
putc
(355)
#=> cccc

putc
(99.00) #=> c
putc
(33333333333333333333333333333333333) # bignum too big to convert into `long' (RangeError)
//}

@see IO#putc...