[#1026] Is this a bug? — Dave Thomas <Dave@...>

18 messages 2000/01/03

[#1084] Infinite loop — Dave Thomas <Dave@...>

17 messages 2000/01/11

[#1104] The value of while... — Dave Thomas <Dave@...>

24 messages 2000/01/11

[ruby-talk:01107] Re: The value of while...

From: matz@... (Yukihiro Matsumoto)
Date: 2000-01-11 23:49:54 UTC
List: ruby-talk #1107
In message "[ruby-talk:01104] The value of while..."
    on 00/01/11, Dave Thomas <Dave@thomases.com> writes:

|'while' is an expression, and it always returns 'nil'.

Yes.

|YDAQ: How can I use it as an expression without eval-ing
|
|  a = ( while 1 < 0
|         99
|        end
|      )
|
|gives me a parse error 'void value expression'

Are there any realistic need for using the `while' value?

Some expressions (e.g. while, break, etc.) are marked as void
expression by the parser.  I can relax them very easily if they bother
you rather than helping you.

							matz.

In This Thread