![]() |
![]() |
Script Function ReferenceFunction Reference >Script Function Reference >Table Formats>listListThe list format is a table representing a list.
x.type = "list"
Here is an example using the list format.
x.len -- represents the length of the list x[1:len] -- the elements in the list, each element is a number format
function average(list)
sum = 0 for i = 1,list.len do sum = sum + list[i].r end return sum / list.len end |