You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we haven't yet determined what the syntax for initializing multi-dimensional arrays should be, we wanted to ensure that if you try and print out a multidimensional array in "Chapel style" we get some kind of error
message.
The text was updated successfully, but these errors were encountered:
stonea
changed the title
Array module review followup: Investigate if we throw an exception if you try and do a "Chapel Style" print out of a multidimensional array.
Array module review followup: Throw an exception if you try and do a "Chapel Style" print out of a multidimensional array.
Aug 24, 2021
…ultidim_array_print
Array module review --- error on multidim array print
This PR satisfies this issue: #18090 (Array module review followup: Investigate if we throw an exception if you try and do a "Chapel Style" print out of a multidimensional array)
Basically, we decided that since Chapel doesn't have a syntax for defining a multi-dimensional array literal we want to error out if you try and do a "Chapel style" print
In other words the following should error:
```Chpl
var A:[1..2, 1..2] string = "hi";
writef("%ht\n", A);
```
And with this PR, it now will with the following message:
```
uncaught IllegalArgumentError: Can not perform Chapel write of multidimensional array.
foo.chpl:2: thrown here
foo.chpl:2: uncaught here
```
[Reviewed by @bradcray and @dlongnecke-cray]
This is a followup item for the Array module review.
Since we haven't yet determined what the syntax for initializing multi-dimensional arrays should be, we wanted to ensure that if you try and print out a multidimensional array in "Chapel style" we get some kind of error
message.
The text was updated successfully, but these errors were encountered: