Select (MPI)
From Tapestries MUCK
(Difference between revisions)
Line 1: | Line 1: | ||
- | [[Category: | + | [[Category:functions (MPI)]][[Category:Property Handling (MPI)]] |
=select= | =select= | ||
<mpi>{select:value,listname} | <mpi>{select:value,listname} |
Latest revision as of 01:41, 31 March 2007
select
{select:value,listname} {select:value,listname,object}
Returns the value of a single list item from a sparse property list.
The item chosen is the one who's line number is the largest one that is less than or equal to the given value. If the list is missing any items, then {select} will return the item in the list with the highest line number that is less than or equal to the given value.
ie: If the list has the following entries:
_junk#/1:one _junk#/5:two _junk#/16:three _junk#/20:four
Then
{select:9,_junk}will return "two",
{select:16,_junk}will return "three", and
{select:25,_junk}will return "four".