7stud -- wrote in post #1089965:
>> an official definition of a newline
>
> Inside a ruby program, a newline is defined to be the string: "\n".
>
> However, anytime you hit <RETURN> in your text editor an invisible
> newline is entered into the text you are typing.  All text is just one
> long continuous string of characters--where some of the characters may
> be spaces, tabs, or newlines.  But text editors do something special
> when
> they display a newline--they skip down to the next line to display the
> text that follows a newline.

Thanks, but I am no longer trying to wrap my head around it.  I tested
it in some C++ and Perl code, did not work, so I'm fine with proven
failed results.  I only began this query because I did not understand
why Ruby would not allow a conditional to span the lines as such before
I even introduced comments:

    n = ( w == w.abs ) \
        ? n + w * d
        : -1 * ( n - w * d ) if d != 0

...without putting a durn slash in the first line.  Without it, I get:

./ratnum.rb:17: warning: invalid character syntax; use ?\s
./ratnum.rb:17: syntax error, unexpected '?', expecting keyword_end
        ? n + w * d                   ...
         ^
./ratnum.rb:18: syntax error, unexpected ':', expecting keyword_end
        : -1 * ( n - w * d ) if d != 0...
         ^
I do understand that line termination, or an optional semi-colon, 
completes a statement in Ruby.

Perl does just fine without the slash:

    $n = ( $w == abs($w) )
        ? $n + $w * $d
        : -1 * ( $n - $w * $d ) if $d;

I appreciate your effort, but am ready to move on to something else to 
talk about.  heh

-- 
Posted via http://www.ruby-forum.com/.