What is keyboard equivalent?

In the attached image file (http://goo.gl/brVSa), the symbol in the red
circle with the blue arrow pointing to it–what is it? How do I type it
in?

If I copy-paste the code as it is, I get an error message–Invalid char
`\342’ in expression

thanks!

Don’t type it in. This symbol represents a linebreak and isn’t really
part
of the code.

2011/4/26 Jim S. [email protected]

On Tue, 26 Apr 2011 19:05:21 +0900
“Jim S.” [email protected] wrote:

In the attached image file (http://goo.gl/brVSa), the symbol in the
red circle with the blue arrow pointing to it–what is it?

Sometimes when a person wants to show their code to someone else, their
code is too wide to display properly. If the code is too wide, it must
be “broken off” and continued on the next line. That symbol indicates
this.

Sometimes it does not matter when some of the code is on a second line,
but sometimes it does.

This is for presentation purposes. If you need to deal with a
limitation of say a console you can use the continuation character
to represent the same thing within your code.

Example:

x = “This is a really long string
But it really is only one line to ruby
Though you see three lines in irb”
=> “This is a really long string But it really is only one line to
ruby Though you see three lines in irb”

If you did the same thing without the continuation char it would auto
input \n in place of every carriage return.

~

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs