Re: Attributes

Francisco Olarte <[email protected]> Thu, 28 May 2026 12:17:43 +0200
Newsgroups gmane.comp.lang.lua.general
Message-ID <CA+bJJbzPX3g=pBDVZ3-=G9k9vD9do+nM=+ZQP+skoFheFwubVQ@mail.gmail.com>
Eugeny:

On Thu, 28 May 2026 at 11:57, 'eugeny gladkih' via lua-l
<[email protected]> wrote:
> > On 26 May 2026, at 20:46, 'Martin Eden' via lua-l <[email protected]> wrote:
> > In the language plane Lua 5.4 added optional "attribute" element to
> > variable declaration:
> >
> >   stat ::= local attnamelist [‘=’ explist]
> >   attnamelist ::= Name attrib {‘,’ Name attrib}
> >   attrib ::= [‘<’ Name ‘>’]
>
> added, but weird thing happened:
>
> Lua 5.4.8  Copyright (C) 1994-2025 Lua.org, PUC-Rio
> > local s<close,const>=io.open( 's', 'r' )
> stdin:1: '>' expected near ','


> this code seems to be very useful and friendly, but no way…

But it is doing the thing, the syntax added optional atttribute, not
attribute list.

< close , const > has two names and a comma, attrib takes just a single name.

Francisco Olarte.

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/CA%2BbJJbzPX3g%3DpBDVZ3-%3DG9k9vD9do%2BnM%3D%2BZQP%2BskoFheFwubVQ%40mail.gmail.com.