varsFromStrProp: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Applied Template:MacroFunction) |
|||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=varsFromStrProp | |||
|description= | |||
Creates variables from a [[Macros:string property list|string property list]] with the values assigned to variables with the names of the keys in the [[Macros:string property list|string property list]]. The function returns the number of variables that were created. | Creates variables from a [[Macros:string property list|string property list]] with the values assigned to variables with the names of the keys in the [[Macros:string property list|string property list]]. The function returns the number of variables that were created. | ||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: num = varsFromStrProp(props)] | [h: num = varsFromStrProp(props)] | ||
</source> | </source> | ||
|examples= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: varsFromStrProp("a=blah; b=doh; c=meh")][r: a] [r: b] [r: c] | [h: varsFromStrProp("a=blah; b=doh; c=meh")][r: a] [r: b] [r: c] | ||
Line 15: | Line 15: | ||
Returns | Returns | ||
blah doh meh | blah doh meh | ||
}} | |||
[[Category:String Property List Function]] |
Revision as of 05:41, 9 March 2009
varsFromStrProp() Function
Creates variables from a string property list with the values assigned to variables with the names of the keys in the string property list. The function returns the number of variables that were created.
Usage
[h: num = varsFromStrProp(props)]
Examples
[h: varsFromStrProp("a=blah; b=doh; c=meh")][r: a] [r: b] [r: c]
Returns
blah doh meh