Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Ruby

Idiom #245 Print value of custom type

Print the value of object x having custom type T, for log or debug.

puts x

Result cam be customized by defining a to_s method on x
#include <iostream>
std::cout << x;

New implementation...
< >
花大喵