List.PositionOf
语法
List.PositionOf(list as list, value as any, optional occurrence as nullable number, optional equationCriteria as any) as any
关于
返回 value
值在列表 list
中显示的值的偏移量。 如果值未出现,则返回 -1。 可以指定一个可选的出现参数 occurrence
。
occurrence
:要报告的最大出现次数。
示例 1
查找列表 { 1, 2, 3 } 中出现值 3 的位置。
使用情况
List.PositionOf({ 1, 2, 3 }, 3)
输出
2