Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: What is wrong in this code ... ???
Devin Mullins
7/5/2005 8:05:00 PM
> p st.inspect is short for print st.inspect, which sends the string to STDOUT.
Not quite.
print "blah" prints blah to stdout
print "blah","bloo" prints blahbloo to stdout
puts "blah" is short for print "blah", "\n"
p st is short for puts st.inspect
These are all documented in the Kernel module:
http://www.ruby-doc.org/core/classes/K...
Well, except for the #inspect method, which is documented in the Object class, as well as, probably, other places that override its behavior.
http://www.ruby-doc.org/core/classes/O...
Granted, that's not the best way to learn the language. 'Programming Ruby' is a much better way, or why's (Poignant) Guide to Ruby.
http://phrogz.net/Progra...
http://poignantguide...
HTH,
Devin
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: What is wrong in this code ... ???
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password