File: zombies.ll

package info (click to toggle)
lifelines 3.0.50-2
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 11,140 kB
  • ctags: 6,517
  • sloc: ansic: 57,468; xml: 8,014; sh: 4,255; makefile: 848; yacc: 601; perl: 170; sed: 16
file content (34 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * @progname       zombies.ll
 * @version        1995-06
 * @author         H. V<a-umlaut>is<a-umlaut>nen
 * @category       
 * @output         Text
 * @description

  zombies - a list of people who should be dead but who are not.
  This program lists all persons who have been born over 100 years
  and who have a birth event but not a dead event.

  Birth year is output first, so that you can sort the output file by

    sort file


  Written by H. V<a-umlaut>is<a-umlaut>nen, June 1995.
*/

proc main ()
{
  forindi(indi, num) {
    set(birt,0)
    set(dead,0)
    if (b, birth(indi)) {set(birt,1)}
    if (d, death(indi)) {set(dead,1)}
    if (and(eq(birt,1), eq(dead,0))) {
      if (le(atoi(year(b)),1894)) {
        year(b) " " fullname(indi,0,1,50) " " date(b) "\n"
      }
    }
  }
}