[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: When is a string not a string?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 23 Jan 2019 17:27:34 +0200
Op Wo. 23 Jan. 2019 om 17:03 het Kenneth Lorber <email@example.com> geskryf:
> (A related question was posed in a different manner back in 2007 but the discussion didn't go anywhere after noting a grammar conflict that IMHO is not relevant for useful use cases. )
> When is a string not a string? When it's string literal.
> Here's a trivial example adapted from a different context:
> > function string:alike(other) return self:lower() == other:lower() end
> > s = "WomBat"
> > s:alike"wombat"
> > "wombat":alike(s)
> stdin:1: unexpected symbol near '"wombat"'
This is a syntax error. You need parentheses.