Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Vb

Idiom #26 Create a 2-dimensional array

Declare and initialize a matrix x having m rows and n columns, containing real numbers.

Dim x(m - 1, n - 1) As Double

For compatibility with old VB6 code, VB.Net will interpret a "Dim x(3, 5)" as an array with rows 0..3 and columns 0..5, or 4x6.
X : array (1 .. M, 1 .. N) of Float := (others => (others => 1.0));

New implementation...