autodoc.git/
autodoc.xml
Branch:
Tag:
Non-build tags
All tags
No tags
2000-11-21
2000-11-21 17:22:09 by Johan Sundström <oyasumi@gmail.com>
fdfbe0e9ca10d1ba44eb57583a65df20e3b6967c (
31
lines) (+
31
/-
0
)
[
Show
|
Annotate
]
Branch:
8.0
added Function.splice_call
Rev: lib/modules/Function.pmod:1.4
5304:
</class> </module> </module>
+
<module name='Function'>
+
<docgroup homogen-name='' homogen-type='import'>
+
<import name=''><classname resolved='predef::'>predef::</classname></import>
+
</docgroup>
+
<docgroup homogen-name='splice_call' homogen-type='method'><doc><text><p>Calls the given function with the <tt>args</tt> array plus the optional
+
extra arguments as its arguments and returns the result.</p>
+
<p> Most useful in conjunction with <ref>map</ref>, and particularly in combination
+
with <ref>sscanf</ref> with <tt>"...%{...%}..."</tt> scan strings (which indeed
+
was what it was invented for in the first place).</p>
+
</text><group><example/><text><p>class Product(string name, string version)
+
{
+
string _sprintf()
+
{
+
return sprintf("Product(%s/%s)", name, version);
+
}
+
}
+
map(({ ({ "pike", "7.1.11" }),
+
({ "whitefish", "0.1" }) }),
+
Function.splice_call, Product);
+
({ /* 2 elements */
+
Product(pike/7.1.11),
+
Product(whitefish/0.1)
+
})</p>
+
</text></group></doc>
+
<method name='splice_call'>
+
<arguments><argument name='args'><type><array/></type></argument><argument name='f'><type><function/></type></argument><argument name='extra'><type><varargs><or><mixed/><void/></or></varargs></type></argument></arguments>
+
<returntype><mixed/></returntype>
+
</method>
+
</docgroup>
+
</module>
<module name='Gdbm'> <class name='gdbm'> <doc placeholder='true'>