🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

string array error

Started by
0 comments, last by WitchLord 10 years, 2 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?
Advertisement

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