[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Which is the preferred way?

jabowen

8/2/2007 7:03:00 PM

I see that ?p? is the same as ?puts?. Which would
most programs use in a program?

Jeff



____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase....

1 Answer

Alex Young

8/2/2007 7:13:00 PM

0

Jeffrey Bowen wrote:
> I see that ?p? is the same as ?puts?. Which would
> most programs use in a program?
It's not the same - p foo is equivalent to puts foo.inspect. They're
used for different things; p is for debugging output, puts for general
text display.

--
Alex