| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I want to slice a bidimensional array. Or extract/view a row thereof as a unidimensional array (of the same component type of course). This is illegal in Ada. So I am designing a slicer/extractor/viewer subprogram. The arrays can be large, so I want to approximate the efficiency of view conversions. I'd appreciate confirmation/ infirmation of the following premises. The internal representation of a bidimensional array is one row after the other sans separators. This representation equates that of a unidimensional array (of the same component type). All this excluding the range information of course, i.e. looking only at the data part. So we can safely (unchecked?) convert between the two array types. Thanks a lot. |
|
#2
| |||
| |||
| On Fri, 8 Aug 2008 08:26:42 -0700 (PDT), amado.alves@gmail.com wrote: >I want to slice a bidimensional array. Or extract/view a row thereof >as a unidimensional array (of the same component type of course). This >is illegal in Ada. Barnes ("Programming in Ada 2005") discusses some interesting possibilities for slicing - not using a 2-D array, but an array of arrays. The array can be sliced; as can each individual array. I don't know if this would help in your situation, but it is another tool in the box. - Brian |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.