LifeLines Programmers Reference

Version 3.0.2

up | previous | next | Tom Wetmore | ttw@shore.net | LifeLines


Family Functions

These functions take a family as an argument and return information about it.

FunctionDescription
event marriage(fam) Marriage returns the first marriage event in the family record; it returns null if there is none.
indi husband(fam) Husband returns the first husband/father of the family; it returns null if there isn't one.
indi wife(fam) Wife returns the first wife/mother of the family; it returns null if there isn't one.
int nchildren(fam) Nchildren returns the number of children in the family.
indi firstchild(fam) Firstchild returns the first child in the family.
indi lastchild(fam) Lastchild returns the last child in the family.
string key(fam|indi [,bool]) Key was described in the section on person functions.
Node fnode(fam) Fnode and root return the root node of a family GEDCOM record. Note that a fam value is not a node value. If you want to process the nodes within a family node tree, you must first use root or fnode function to get the root of the family node tree.
Node root(fam)Root performs the same function as fnode; root also returns the root nodes of person records.
fam fam(string) Fam returns the family who's key is passed as an argument; if no family has the key, fam returns null.
fam firstfam() Firstfam, nextfam and prevfam allow you to iterate through all families in the database. Firstfam returns the first family in the database in key order.
fam nextfam(fam) Nextfam returns the family after the argument family in key order.
fam prevfam(fam) Prevfam returns the family before the argument family in key order.
children (fam, indi_v, int_v) { } Children is an iterator that loops through the children in a family. Its first parameter is a family; its second parameter is a variable that iterates through each child; its third parameter is an integer counter variable that counts the children starting at one. These two variables may be used within the loop body.
forfam (fam_v, int_v) { } Forfam is an iterator that loops through every family in the database in ascending key order. Its first parameter is a variable that iterates through the families; its second parameter is an integer counter variable that counts the families starting at one.

up | previous | next | Tom Wetmore | ttw@shore.net | LifeLines

1/1/00