Difference between put and print?


#1

I just want to know. Does there exist any difference in Ruby if I use "put" or "print"?


#2

It's actually puts which is short for put string. print holds its last printed character position so that successive print statements will stay on the same line with no white space between (unless we add it in). puts will always print a newline character after the output so each puts statement renders on its own line in the console.


#3

@codeninja06466
and as extention to @mtf
you might want to read
http://stackoverflow.com/questions/3091524/what-are-carriage-return-linefeed-and-form-feed
to get a feel of the =history=