fbpx

NET Multidimensional array syntax problem

More
4 months 1 week ago #1 by Guy DEPREZ
NET Multidimensional array syntax problem was created by Guy DEPREZ
Hi All,

LOCAL aMulti AS STRING[,]
aMulti := STRING[,]{2,2}{ <STRING>{ "X#", "xsharp.info" }, <STRING>{ "C#", "microsoft.com" } }

It compiles correctly and runs without errors but aMulti is not filled with the data (NULL values)

Syntax problem?

(X#Core dialect, tested in XIDE)
See picture for details.
Guy
Attachments:

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #2 by Chris Pyrgas
Replied by Chris Pyrgas on topic NET Multidimensional array syntax problem
Hi Guy,

Thanks for the report, it seems the compiler creates the array with the first part of the statement (aMulti := STRING[,]{2,2}) which initializes the array and ignores the rest, that's why you get NULL values only.

I'll open a report about this, in general the array initialization aspect needs some improvements indeed. For now please specify multi-dim array elements one by one.

Chris

XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.