Forum Discussion
EnTerr
11 years agoRoku Guru
"TheEndless" wrote:Peace and blessings be upon them, indeed! --Charlie
Best debug console update is the fact that it doesn't exit the channel when you break into it now!
"Komag" wrote:Unofficially it has been in a beta for couple of months, see viewtopic.php?f=34&t=75809&p=463321#p462756
Can we count AA's?
It was documented yesterday in ifAssociativeArray
"TheEndless" wrote:Hmmm. What firmware would that be that you are talking about? Does not work on 6.1.5518:
Indexers are also available (i.e., AA[1])
BrightScript Debugger> a = {a:1, b:2}
BrightScript Debugger> ? a[0]
Type Mismatch. (runtime error &h18) in $LIVECOMPILE(482)
"TheEndless" wrote:"Komag" wrote:
Does that mean they're no longer "random"? Alphabetical? How can we reasonably make use of indexers
They've never been "random" as the keys are always enumerated in the same order (no idea what that order is). I have no idea how you'd use indexers... I just noticed it by accident while debugging something the other day.
Ummmm, not quite. The enumeration order of hash/dictionary traditionally is pseudo-random but is not guaranteed to remain the same. What is guaranteed is that enumeration will go through all elements (in some arbitrary order - and in some implementations on condition the AA is not modified during the enumeration). I doubt RokuCo would like to codify that enumeration is in the same order. I also have serious doubts about usefulness of what you call "indexers" but looking forward to hear more