Debian Codegraph @

reports/st/test_indi_it.ll

raw
1 /*
2 * @progname test_indiit
3 * @version 1
4 * @author Stephen Dum
5 * @category self-test
6 * @output text
7 * @description
8 *
9 * test indi iterators: forindi, Parents, families, spouses, mothers, fathers
10 * Iterate over some data, printing results, so we can
11 * compare the output with exected results.
12 */
13
14 proc main() {
15 print(nl())
16 forindi(i,c) {
17 print(d(c),": ",key(i),nl())
18 print(" Parents\n")
19 Parents(i,f,c2) {
20 print(" ",d(c2),": ",key(f),nl())
21 }
22 print(" families\n")
23 families(i,f,s,c2) {
24 print(" ",d(c2),": ",key(f)," ",key(s),nl())
25 }
26 print(" spouses\n")
27 spouses(i,s,f,c2) {
28 print(" ",d(c2),": ",key(s)," ",key(f),nl())
29 }
30 print(" mothers\n")
31 mothers(i,m,f,c2) {
32 print(" ",d(c2),": ",key(m)," ",key(f),nl())
33 }
34 print(" fathers\n")
35 fathers(i,fa,f,c2) {
36 print(" ",d(c2),": ",key(fa)," ",key(f),nl())
37 }
38 }
39 }