Content deleted Content added
Peter Flass (talk | contribs) →Array dimensions: PL/I |
Added information about Microsoft BASIC 'Option Base' and corrected the default type column information for VB and VB.NET. |
||
Line 821:
|-
| [[Visual Basic]]
| style="background:
| style="background:seashell;" | no
| style="background:honeydew;" | yes
Line 830:
|-
| [[Visual Basic .NET]]
| style="background:
| style="background:seashell;" | no
| style="background:cornsilk;" | partial<ref name="dotnetarray"/>
Line 1,032:
<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>
<ref name="msbasicarrays">Microsoft QBASIC, QuickBASIC, Visual Basic, and VBA all had/have the ability to specify ''Option Base 1'', which caused all arrays in the module to default starting at 1 instead of 0. Support for ''Option Base'' was phased out in Visual Basic .NET. In various Microsoft BASIC implementations, arrays can be DIMensioned using ''to'' in order to specify the minimum and maximum index values (e.g. {{Mono|DIM MyArray(2 to 50) AS STRING}} would have the first index at 2 instead of the default).</ref>
}}
|