Home
About
Policies
FAQ
Forums
Registration
Password Recovery

Parse (MPI)

From Tapestries MUCK

Revision as of 01:41, 31 March 2007 by Ash-Fox (Talk | contribs)
Jump to: navigation, search

parse

{parse:var,list,expr}
{parse:var,list,expr,sep}
{parse:var,list,expr,sep,s2}

This evaluates expr for each and every item in the given list.

On each evaluation, the temporary variable var will contain the value of the item under scrutiny. This function returns a list containing the output of expr for each item within the list. This lets you do direct translation of a list of dbrefs, for example: into a list of names. var will only be defined for the duration of expr, and will be undefined after the {filter} construct finishes.

If sep is given, then it uses that string as the item seperator in the input list, instead of the usual carriage return character. If s2 is defined, then it will use that string to seperate the items in the list it returns, instead of the normal carriage return.

sep and s2 can be multiple characters long.

Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox