Branch: refs/heads/main
Revision: a006cbc
Author: stonea
Log Message:
Merge pull request #18262 from stonea/array_module_review__error_on_multidim_array_print
Array module review --- error on multidim array print
This PR satisfies this issue: Array module review followup: Throw an exception if you try and do a "Chapel Style" print out of a multidimensional array. · Issue #18090 · chapel-lang/chapel · GitHub (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:
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]
Modified Files:
A test/io/stonea/printDifferentRankArrays.chpl
A test/io/stonea/printDifferentRankArrays.good
A test/io/stonea/readDifferentRankArrays.chpl
A test/io/stonea/readDifferentRankArrays.dat
A test/io/stonea/readDifferentRankArrays.good
M modules/internal/ChapelArray.chpl
M modules/internal/DefaultRectangular.chpl
M modules/standard/IO.chpl
M test/io/ferguson/write-arrays.chpl
M test/io/ferguson/write-arrays.good
Compare: https://github.com/chapel-lang/chapel/compare/71ca5f04d255...a006cbcc3cc0