develooper Front page | perl.gedcom | Postings from February 2018

Another Problem with Adopted Children

Thread Next
Jutta Wrage
February 19, 2018 18:53
Another Problem with Adopted Children
Message ID:

THanks for help with my children count problem.

Ich got it working to print out all families of one person requested an get the children mumered and counted correctly.
I can print my grandma for exampple and both husbands and have my father in both of the families with index that does not change in the second family.
If there is no first husband at all an father unknown, I just print out "Unknown Father" als Father in the first family.

But nor I got in a pitfall again:

I want to print out a child which appears in two families.
Lazy as I am I do not add unknown fathers to a family always.

I have an adopted child:

Family 1:

Mother 1 and no father

Family two (adoption):

Father 2
Mother 2

To print out parents of a person I use this up to now:

> 	print "\nEltern von $startname:\n" if ($mail);
> 	if ($start->father) {
> 		print_person($start->father, 1);
> 	} else {
> 		print "\tkein Vater bekannt\n";
> 	}
> 	if ($start->mother) {
> 		print_person($start->mother, 1);
> 	} else {
> 		print "\tkeine Mutter bekannt\n";
> 	}

Put that prints

Eltern von person

0 Father 2
0 Mother 1

How do I get the second  mother "Mother 2"?

Do I need to iterate through famc families instead of using $start->father and $start->mother?




Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About