[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01758] Re: Perl => Ruby

From: Dave Thomas <Dave@...>
Date: 2000-03-06 17:14:37 UTC
List: ruby-talk #1758
The following message is a courtesy copy of an article
that has been posted to comp.lang.misc as well.

"Dat Nguyen" <thucdat@hotmail.com> writes:

> That's it!
> What's a relief!
> 
> On WIN/NT DOS, after:
> C:\Program\Ruby>ruby sample\eval.rb
>

You might want to add '-e0' to the command line. That makes the
termination slightly tidier.

> I tried:
> ruby>print "Hello World"
> 
> It yields:
> Hello Worldnil
> 
> I've been through this kind of thing in Perl, the 'nil' is the value 
> returned by the whole print statement, right?

That's it!

If you'd just typed

ruby> "hello world"

It would have said "hello world". There's normally no need for print
or puts statements, the main loop of eval inspects and prints the
result of the expression you type.


Regards


Dave

In This Thread

Prev Next