[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: breaking up long string literals
- From: "Dimitris P." <jimmyp@...>
- Date: Fri, 27 Jun 2003 06:55:25 +0300
Hi,
I have some pretty long strings containing binary data like this one:
data = "\000\020\005\123\ ... \233\245\255\123\234\142"
Is there any way to make that line look beter? It tends to get pretty long but I can't break it up because it'll introduce \n chars in the data. I'd like to make it a bunch of ~80 chars long lines and in C I would be able to do that like this:
data =
"\000\020\005\123\ ... \233\245\255\123\234\142"
"\000\020\005\123\ ... \233\245\255\123\234\142"
...
"\000\020\005\123\ ... \233\245"
Is there any way to do this in lua? I couldn't find anything in the manual. I generally often wonder why lua doesn't have some helpful features C has like the one above or support for specifying numeric literals in non-decimal bases like 2, 8, 16 (which I consider quite important especially when reading configuration scripts or interfacing C apis). This couldn't be considered bloat could it?
Dimitris