Re: [Seed7-users] Multi-Dimensional Return Bug
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: Thomas M. <tho...@gm...> - 2021-11-14 08:51:14
|
Hi Zachary In your example the two occurrences of 'array array string' are considered as two different types. This triggers the error. If you introduce a named type for the two dimensional array the error vanishes: const type: stringArray2D is array array string; const func stringArray2D: test_multiplication (in string: value) is func result var stringArray2D: data is 0 times 0 times ""; begin data := 3 times 2 times value; end func; You are right that this happens with all types of multi-dimensional arrays. Declaring a named type helps in all these situations. I also added an explanation to the FAQ at http://seed7.sourceforge.net/faq.htm#two_dimensional_array . I hope this helps Regards Thomas |