Comparison of programming languages (array): Difference between revisions

Content deleted Content added
Line 1,026:
<ref name="cr28">While COBOL only has arrays-of-arrays, array elements can be accessed with a multi-dimensional-array-like syntax, where the language automatically matches the indexes to the arrays enclosing the item being referenced</ref>
<ref name="cr29">While Golang's Array type is not dynamically sized, the data type [https://tour.golang.org/moretypes/7 Slice] is dynamically-sized and is much more common in use than arrays.</ref>
<ref name="cr30">Size can only be chosen on initialization or when the array is allocated, after which it is fixed.</ref>
<ref name="dotnetarray">The base can be changed when initializing with {{Mono|System.Array.CreateInstance}} (which returns {{Mono|System.Array}}), but not when using the language syntax. Arrays with non-zero base indices are not the same type as those with zero base indices and cannot be manipulated using language syntax (the {{Mono|GetValue}} and {{Mono|SetValue}} methods must be used instead) or downcast to a specific type ({{Mono|T[]}} in C#, or {{Mono|T()}} in VB.NET), preventing breakage of code assuming base indices of zero.</ref>
<ref name="xpath">XPath/XQuery has two kinds of arrays. ''Sequences'' {{Mono|(1,2,3)}} which cannot nest and in the XPath/XQuery 3.1 version ''arrays'' {{Mono|array { 1,2,3 }}} or {{Mono|[1,2,3]}} which can.</ref>