"btpoole" wrote:
Since there is not a .count(), is there anyway to count the number of shows (name) that may be present in a particular amount of time say 1 hour
You might have been confused by our exchange above. There is no
.count() for dictionaries ("roAssociativeArray", the ones in curly brackets, e.g. {key: "value"} ) but
.count() for arrays (roArray, e.g. [1, "two"] ) is working fine, no worries.
Accordingly, looking at previous example
function dump(schedule):
for i = 1 to schedule.count()-1:
day_sched = schedule[i]
day = day_sched[0].attr
for j = 1 to day_sched.count()-1:
hour_sched = day_sched[j]
time = hour_sched[0].attr
for k = 1 to hour_sched.count()-1:
? day, time, hour_sched[k].name
end for
end for
end for
end function
-
schedule.count()-1 will give you how many days are included in the schedule
- when looking at a specific day (i.e. inside
for i loop),
day_sched.count()-1 gives the number of time slots
- when focusing on a specific time slot in particular day (i.e. inside
for j ),
hour_sched.count()-1 gives the number of shows there
I don't understand the rest of your question/comment. Maybe try being more specific, copy&paste (small) piece of code that gives you trouble, also copy&paste the exact error, etc