lua-users home
lua-l archive

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


I stand corrected. I only had Lua4 interpreter at hand. Guess I'll have to
look more deeply into this. :)

----- Original Message -----
From: "Rici Lake" <lua@ricilake.net>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Thursday, January 26, 2006 5:38 PM
Subject: Re: Scripting language takes a silicon turn


>
> On 26-Jan-06, at 11:19 AM, Alen Ladavac wrote:
>
> > So, I'm lead to conclusion that if you have round braces around if's
> > condition you can pretty well have curly braces around its block
> > without a problem. What do you think?
>
> I think you're using Lua 4. That's not a Lua 5 error message:
>
> rlake@freeb:~/src/lua-5.1$ lua
> Lua 5.0.2  Copyright (C) 1994-2004 Tecgraf, PUC-Rio
>  > function a() print("a") end
>  > if (a){a = 1} then print "then" else print "else" end
> a
> else
>  > =loadstring"if(a) { b = 1}"
> nil     [string "if(a) { b = 1}"]:1: `then' expected near `<eof>'
>
>
>
>
>
>