Hi --

On Thu, 5 Dec 2002, Chris Pine wrote:

> Here's what I consider to be one of the last programs before variables are
> introduced, and it uses a different kind of loop:
>
>   puts 'Type something, will ya?  Then press "Enter".'
>
>   while (true)
>     if (gets == 'quit')
>       break
>     else
>       puts 'Type "quit" to quit!'
>     end
>   end
>
>   puts 'Very good!  Good-bye.'
>
> So... thoughts?

gets == 'quit' won't happen, because the string will be 'quit\n' :-)


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav