What does "lines [0]" mean?

HI! I'm looking for a document that defines what the word "rows [0]" means. this is for BIRT in Eclipse environment. Could it be a Javascript word? I don't know ... searched like crazy and found nothing. Any ideas?

0


a source to share


3 answers


rows is a shortcut for dataSet.rows. Returns the current data rows (of type DataRow []) for the dataset associated with this instance of a report item. If this report item does not have a dataset, this property is undefined.



Source: http://www.eclipse.org/birt/phoenix/ref/ROM_Scripting_SPEC.pdf

+1


a source


Typically, code such as rows [x] refers to an element within an array. Any introduction to a programming book should be able to figure this out for you.



rows [0] will refer to the first element of the array.

+1


a source


This operation has several names depending on the language, but usually the same concept. In Java, it is an expression an array access expression in C #, it is an indexer or an array access operator . As it is anyway, C ++ is more complicated, but basically the [] operator takes a collection of something or an array and pulls (or assigns) a specific numbered element in that collection or array (usually starting at 0). So in C # ...

// create a list of integers
List<int> lst = new List<int>() { 1, 2, 3, 4, 5 }; 

// access list
int x = lst[0]; // get the first element of the list, x = 1 afterwords
x = lst[2];     // get the third element of the list, x = 3 afterwords
x = lst[4];     // get the fifth element of the list, x = 5 afterwords
x = lst[5];     // IndexOutOfBounds Exception

      

0


a source







All Articles