lua-users home
lua-l archive

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



On Dec 11, 2007 12:22 PM, Roger D. Vargas <luo_hei@yahoo.es> wrote:


Stefan Sandberg escribió:
> ...which means your line breaks are missing.
line breaks? Do I need DOS like line breaks?

My tests seem to indicate that a line break can be 0xA (char 10, \n, linefeed), 0xD (char 13, \r, carriage return) or both:

Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
> testval = nil
> print(testval)
nil
> assert(loadstring("-- comment \013 testval = 1"))()
> print(testval)
1
> assert(loadstring("-- comment \010 testval = 2"))()
> print(testval)
2
> assert(loadstring("-- comment \017 testval = 3"))()
> print(testval)
2
> assert(loadstring("-- comment \010\013 testval = 12"))()
> print(testval)
12
>