Debian Codegraph @

reports/getbaptism.li

raw
1 /*
2 * @progname getbaptism.li
3 * @version none
4 * @author anon
5 * @category
6 * @output gedcom node function value
7 * @description
8 *
9 * getbaptism(ind) -> NODE
10 * The built-in baptism() function is limited to "CHR" records.
11 * Many programs use the "BAPM" and LDS uses "BAPL" so this version
12 * looks for all three in the order "CHR", "BAPM", "BAPL".
13 *
14 */
15 func getbaptism(ind)
16 {
17 if (e, baptism(ind)) { return (e) }
18 fornodes(root(ind), node) {
19 set(t, tag(node))
20 if (eqstr(t, "BAPM")) { return (node) }
21 if (eqstr(t, "BAPL")) { return (node) }
22 }
23 return (0)
24 }