Breaking code onto multiple lines

In C++, you can break a line of code onto multiple lines. This counts as “whitespace” with no effects on the code. In MATLAB, an interpreted language, you can break code into multiple lines by putting a … at the end of each line.

However, in Squirrel, I have not found a way to do this. Is it possible to have something like this?

allowedNames[] = { "Leo", "Jeffrey", "Justin", "Vladimir" };

Yes, squirrel ignores whitespace just like C/C++. If you want to do a multi-line string, then you use @", see http://www.squirrel-lang.org/doc/squirrel3.html#d0e473

In your example there though, you appear to be trying to declare something in the root table, which won’t work. Change it to:

allowedNames <- [ "Leo", "Jeffrey", "Justin", "Vladimir" ];

…as you’re declaring an array of strings, not a table. [] = array, {} = table.

Thank you for that Hugo. I was becoming frustrated and thought Squirrel didn’t ignore whitespace because I was trying to declare it in the root table above with the C syntax. Didn’t know you had to use [] instead of {}.