Advertisement

string array error

Started by April 11, 2014 09:34 AM
0 comments, last by WitchLord 10 years, 7 months ago

Dear andreas:

I decare a string array

ex:

string[] arr = { "11111" , "222222"};

But If I remove the comma

string[] arr = { "11111" "222222"};
angelscript won't report parsing error.
Instead, this statement is equal to string[] arr={"11111222222"};
Is it a bug?

No, it's not a bug. Just like in C++ the compiler will concatenate string literals that are only separated by white spaces.

This is documented here:

http://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes_strings.html

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement