[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: merging lua files
- From: Romulo <romuloab@...>
- Date: Fri, 2 Jul 2010 10:19:13 -0300
On Fri, Jul 2, 2010 at 10:14 AM, Valerio Schiavoni
<valerio.schiavoni@gmail.com> wrote:
> i've tried this code, introducing an error in the code:
>
> loadstring( [=====[
> foo = bar
> print'ok'
> print
> ]=====], 'a.lua' )()
>
> I was execting a stacktrace like:
> lua: a.lua:3: '=' expected near ''
Sorry, it should be:
assert( loadstring( [=====[
foo = bar
print'ok'
print
]=====], '=a.lua' ))()
$ lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> assert( loadstring( [=====[
>> foo = bar
>> print'ok'
>> print
>> ]=====], '=a.lua' ))()
stdin:1: a.lua:4: '=' expected near '<eof>'
stack traceback:
[C]: in function 'assert'
stdin:1: in main chunk
[C]: ?
--rb