你好!我正在寻找一个文档来定义“rows[0]”这个词的含义。这是 Eclipse 框架中的 BIRT。也许这是一个 Javascript 词?我不知道...一直在疯狂地寻找,但什么也没找到。有任何想法吗?
Bradley
问问题
3665 次
3 回答
1
通常像 rows[x] 这样的代码正在访问数组中的元素。任何编程书籍介绍都应该能够为您定义。
rows[0] 将访问数组中的第一个元素。
于 2009-05-06T15:56:49.863 回答
1
rows 是 dataSet.rows 的快捷方式。返回与此报表项实例关联的数据集的当前数据行(DataRow[] 类型)。如果此报表元素没有数据集,则此属性未定义。
资料来源: http: //www.eclipse.org/birt/phoenix/ref/ROM_Scripting_SPEC.pdf
于 2009-05-06T15:58:33.917 回答
0
该操作有多个名称,具体取决于语言,但通常是相同的概念。在 Java 中,它是C# 中的数组访问表达式,它是索引器或数组访问运算符。与几乎任何东西一样,C++ 更复杂,但基本上 [] 运算符获取某物或数组的集合,并拉出(或分配给)该集合或数组中的特定编号元素(通常从 0 开始)。所以在 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
于 2009-05-06T16:23:54.853 回答