2016-09-15 43 views

回答

0

不要使用roArray - 使用roAssociativeArray代替:

found = {a: 1, b: 1} 
found["c"] = true 
if found.doesExist("s") then ... 
2

如果您正在寻找这样的事情:

someArr.contains("s") 

有没有这样的事情,你必须自己实现它:

function contains(arr as Object, value as String) as Boolean 
    for each entry in arr 
     if entry = value 
      return true 
     end if 
    end for 
    return false 
end function 

目前没有更有效的方法来做到这一点。

+0

你能加入这个聊天吗? - http://chat.stackoverflow.com/rooms/info/125578/brightscript?tab=general –

相关问题