Write characters to an I/O stream with putc, and retrieve those characters with getc. : IO.puts « File Directory « Ruby






Write characters to an I/O stream with putc, and retrieve those characters with getc.


ios = IO.new( 1 )
ios.putc "A"
ios.putc "B"
ios.putc "C"
ios.putc "D"
ios.getc => ABCD

 








Related examples in the same category