View Full Version : Multiple lines
Is there any possiblity in the lua language to continue with the current statement into a new line (like _ in vba"
For example instead of
sTemp = "Hello this will be a newline\nThis is the secondline";
to have something like
sTemp = "Hello this will be a newline\n" _
"This is the secondline";
Thanks.
Brett
05-24-2005, 09:51 AM
sTemp = [[Hello this will be a newline
This is the secondline]];
Thank you very much.
Can the same format be used for breaking up apart a programming line like:
a = 12 + SessionVar.Expand( "%myvar%") + g_expect;
to
a = [[ 12
+ SessionVar.Expand( "%myvar%")
+ g_exptect ]]
?
Brett
05-27-2005, 10:55 AM
No need:
a = 12
+ SessionVar.Expand( "%myvar%")
+ g_exptect;
Should work fine.
Lorne
05-27-2005, 11:59 AM
It's definitely valid in lua...whitespace is ignored within statements, just like in c++.
However, the action editor may not be so savvy...the syntax highlighting and autocomplete might have a bit of trouble interpreting the statements that way. It should still work fine, though, so don't let the "look" of the code in the editor fool you into thinking it's wrong.
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.