| 1 |
/* |
| 2 |
* @progname wife.ll |
| 3 |
* @version 1995-02-10 |
| 4 |
* @author Kurt Baudendistel <[email protected]> |
| 5 |
* @category |
| 6 |
* @output Text |
| 7 |
* @description |
| 8 |
|
| 9 |
A report to find wives. |
| 10 |
*/ |
| 11 |
|
| 12 |
proc main () { |
| 13 |
getstrmsg (str, "Name [hit enter for help]") |
| 14 |
|
| 15 |
if (eq (strlen (str), 0)) { |
| 16 |
|
| 17 |
print ("Enter a name in the browser format ...\n") |
| 18 |
print ("- case insensitive.\n") |
| 19 |
print ("- given name(s) [/optional surname]\n") |
| 20 |
print ("\n") |
| 21 |
print ("... and this program will give a list of women who have this\n") |
| 22 |
print (" as their married name on the screen here.\n") |
| 23 |
print ("\n") |
| 24 |
print ("The matching mechanism, however, is not that used by the\n") |
| 25 |
print ("browser, but simply uses the \"index\" function to create a\n") |
| 26 |
print ("match separately in the given name(s) and surname. While\n") |
| 27 |
print ("this makes partial matching easier, it does not allow for\n") |
| 28 |
print ("abbreviations of multiple given names.\n") |
| 29 |
print ("\n") |
| 30 |
|
| 31 |
} else { |
| 32 |
|
| 33 |
if (i, index (str, "/", 1)) { |
| 34 |
set (Givens, save (substring (str, 1, sub (i, 1)))) |
| 35 |
set (givens, save (Givens)) |
| 36 |
set (j, index (str, "/", 2)) |
| 37 |
if (not (j)) { |
| 38 |
set (j, add (strlen (str), 1)) |
| 39 |
} |
| 40 |
set (Surname, save (substring (str, add (i, 1), sub (j, 1)))) |
| 41 |
set (surname, save (Surname)) |
| 42 |
} else { |
| 43 |
set (Givens, save (str)) |
| 44 |
set (givens, save (Givens)) |
| 45 |
set (Surname, "") |
| 46 |
set (surname, "") |
| 47 |
} |
| 48 |
|
| 49 |
print ("Possible identities of ") |
| 50 |
print (Givens) |
| 51 |
if (strlen (Surname)) { |
| 52 |
print (" (") |
| 53 |
print (Surname) |
| 54 |
print (")") |
| 55 |
} |
| 56 |
print (":\n\n") |
| 57 |
|
| 58 |
forindi (indi, n) { |
| 59 |
families (indi, fam, spouse, m) { |
| 60 |
if (and (strlen (surname (indi)), |
| 61 |
and (index (lower (surname (indi)), surname, 1), |
| 62 |
and (strlen (givens (spouse)), |
| 63 |
index (lower (givens (spouse)), givens, 1))))) { |
| 64 |
if (not (male (spouse))) { |
| 65 |
print (name (spouse)) |
| 66 |
print (" (") |
| 67 |
print (key (spouse)) |
| 68 |
print (")") |
| 69 |
if (date (birth (spouse))) { |
| 70 |
print (" ") |
| 71 |
print (date (birth (spouse))) |
| 72 |
} elsif (date (baptism (spouse))) { |
| 73 |
print (" ") |
| 74 |
print (date (baptism (spouse))) |
| 75 |
} |
| 76 |
print (" -") |
| 77 |
if (date (death (spouse))) { |
| 78 |
print (" ") |
| 79 |
print (date (death (spouse))) |
| 80 |
} elsif (date (burial (spouse))) { |
| 81 |
print (" ") |
| 82 |
print (date (burial (spouse))) |
| 83 |
} |
| 84 |
print ("\n") |
| 85 |
} |
| 86 |
} |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
} |
| 91 |
} |