Obtains the return of the number of rows defined for an array.
Is a constant, the same used to define the array.
Objects: Procedure, Transaction, Web Panel, Panel, Data Provider
Generators: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3), RPG, Visual FoxPro (up to GeneXus X Evolution 3), Cobol, Apple, Android, Angular
By using this function, referring the array's dimensions within the program source is avoided. Modifying the array's dimensions would only cause the corresponding modification throughout the model, but there would be no need to modify the program's source where the array is used.
The following example illustrates how to load a 2D-array whose elements will be the sum of their bidimensional positions (row and column). Notice the &m variable uses the Dimensions property to Matrix.
&I = 1
Do while &I <= Rows(&m())
&J = 1
Do while &J <= Cols(&m())
&m(&I, &J) = &I + &J
&J = &J + 1
&I = &I + 1