[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: odd typo, what's happening
- From: Coda Highland <chighland@...>
- Date: Thu, 17 Dec 2015 15:28:16 -0800
On Thu, Dec 17, 2015 at 3:25 PM, Thijs Schreijer
<thijs@thijsschreijer.nl> wrote:
> I ran into the following;
>
> local v = {type = "timestamp"} -- added to run it
> if v.type == "number" or v .type == "timestamp" then -- actual code
> end
>
>
>
> Notice above, the second `v.type` has a typo with an extra space; `v .type`. I'd expected an error, but it runs fine.
>
> Why?
>
> Thijs
Why not? . is more or less a binary operator and follows the syntax
rules for one.
/s/ Adam