Re: [local] <namelist> = do <block> =<explist> end
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [local] <namelist> = do <block> =<explist> end
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2015年8月18日 20:11:09 +0200
2015年08月18日 19:14 GMT+02:00 Soni L. <fakedme@gmail.com>:
> I'd like a way to do
>
> local v
> do v = 3 end
>
> without assigning nil to v.
You can't have that in principle. No name can ever not be
associated to a value. If you don't do
local v=3
(why on earth don't you?) then Lua explicitly supplies the nil.
Otherwise that slot would contain whatever was in it before
(which may be a user's unencrypted password) and all sorts
of security holes open up.