lua-users home
lua-l archive

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



>> I've discovered that short comments in lua, ala:
>> 
>> -- this is a comment
>> 
>> ...don't work properly on the mac.

> Not true. The compiler is looking for "\n". It's the job of the C library
> to translate incoming end-of-lines to "\n". That's what ANSI C says.

Ah... Makes sense (I tested with "\r\n" and if it works with just "\n" then
no wonder I thought it wanted "\r\n").

Also makes it much easier and faster to search/replace "\r" with "\n".
 
> 
> Perhaps you're using a file created on a different system and not translated
> as a text file during transfer.

This is text typed in by the user directly from TextEdit (I know, don¹t
cringe mac users out that that I'm still using TextEdit; it's on my list to
change! :)

TE always has had \r at new lines...

Ando