lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Then assignment should be an expression. And why can't I do something like

x = while y < 10 do y = y + 1 end

I imagine that might really by a maintenance nightmare, but it wouldn't have
to be used by somebody worried about such things.

> From: "Michael T. Richter" <mtr@igs.net>
> Organization: Half-Baked Software
> Reply-To: lua-l@tecgraf.puc-rio.br
> Date: Tue, 27 Mar 2001 02:13:36 -0500
> To: Multiple recipients of list <lua-l@tecgraf.puc-rio.br>
> Subject: Re: ? assignments are not expressions ?
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
>> Personally, I think all expressions should return values. To me, Lua
>> feels a lot like scheme, except that expressions don't return values.
> 
> All expressions in Lua *DO* return values.  Assignment isn't an expression.
> It's a statement.  :-)
> 
> - --
> Michael T. Richter
> "Be seeing you."
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP Personal Privacy 6.5.3
> 
> iQA/AwUBOsA9n7TM3QkE7U/oEQIePQCfWPBL3Vncv+IjJCONbrGvGXWSvHIAoNQE
> 9Z78X4vgHTdbNjqbVl+WOKLJ
> =1NOL
> -----END PGP SIGNATURE-----
> 
> 
>