Sunday, January 20, 2008, 6:23:57 PM, Peter & Melodye Bowers wrote:
> (When I put n=5 as the argument it somehow doesn't even appear in $args[0]
> -- how is that possible?)
For markup expression definitions follow this convention:
MarkupExpression['expr'] = 'CustomExprFunction(@$arg[0],@$arg[1],@$argp)';
This will be handled by the PmWiki MarkupExpression function, which
will read the option parameters and hands them to the
CustomExprFunction.
$arg[0], $arg[1] etc. are parameters given, in that order, without
keywords. $argp will cover all keyword parameters, like cut=...
hide=... etc. and are handed to the custom function as an array with
keyword and value pairs.
So for instance in
function Grep($pagename, $expr, $src, $opt = NULL) {... }
$expr is equal to $arg[0], $src to $arg[1], and $opt is an array:
$opt['cut'], $opt['hide'] etc. with the keywords and their associated
values from the markup expression.
I think this is th ebasic. I may have missed some details.
~Hans
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users