NET Multidimensional array syntax problem

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Anonymous

NET Multidimensional array syntax problem

Post by Anonymous »

Hi All,

LOCAL aMulti AS STRING[,]
aMulti := STRING[,]{2,2}{ <STRING>{ "X#", "xsharp.eu" }, <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
MultiDimensionalArray.png
MultiDimensionalArray.png (150.72 KiB) Viewed 250 times
User avatar
Chris
Posts: 4902
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

NET Multidimensional array syntax problem

Post by Chris »

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
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply