Which is the preferred way?

Discussion in 'Ruby' started by Jeffrey Bowen, Aug 2, 2007.

  1. 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.yahoo.com/
    Jeffrey Bowen, Aug 2, 2007
    #1
    1. Advertising

  2. Jeffrey Bowen

    Alex Young Guest

    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
    Alex Young, Aug 2, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rod

    Preferred way of passing data

    Rod, Aug 25, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    1,575
    Anon-E-Moose
    Aug 26, 2004
  2. H5N1
    Replies:
    1
    Views:
    742
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 12, 2006
  3. Shiperton Henethe
    Replies:
    117
    Views:
    2,145
    Andy Dingley
    Dec 22, 2004
  4. moondaddy
    Replies:
    3
    Views:
    404
    moondaddy
    Sep 7, 2007
  5. Replies:
    1
    Views:
    373
    Daniel Dyer
    Dec 18, 2007
Loading...

Share This Page