lua-users home
lua-l archive

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

On Fri, Nov 22, 2013 at 1:26 PM, Dirk Laurie <> wrote:
> code =  "return '\n' "
> =load(code)
nil    [string "return '..."]:1: unfinished string near '''

Because the \n is interpreted when you define the string constant containing the code, so load() is receiving:
return '

You need to either double the backslash or (probably more readable for long strings) use [[ ]] instead of " ".

Sent from my Game Boy.