|
|
1.1 ! root 1: program rec(output); ! 2: type ! 3: alfa = packed array[1..10] of char; ! 4: status = (married, widowed, divorced, single); ! 5: date = record ! 6: mo: (jan, feb, mar, apr, may, jun, ! 7: july, aug, sept, Oct, nov, dec); ! 8: day: 1..31; ! 9: year: integer ! 10: end; ! 11: person = record ! 12: name: record ! 13: first, last: alfa ! 14: end; ! 15: ss: integer; ! 16: sex: (male, female); ! 17: birth: date; ! 18: depdts: integer; ! 19: case ms: status of ! 20: married, widowed: ( ! 21: mdate: date); ! 22: divorced: ( ! 23: ddate: date; ! 24: firstd: boolean); ! 25: single: ( ! 26: indepdt: boolean) ! 27: end; ! 28: var ! 29: pp: person; ! 30: p: ^person; ! 31: begin ! 32: pp.name.last := 'woodyard'; ! 33: pp.name.first := 'edward'; ! 34: pp.ss := 845680539; ! 35: pp.sex := male; ! 36: pp.birth.mo := aug; ! 37: pp.birth.day := 30; ! 38: pp.birth.year := 1941; ! 39: pp.depdts := 1; ! 40: pp.ms := single; ! 41: pp.indepdt := true; ! 42: ! 43: new(p); ! 44: p^.name.last := 'woodyard'; ! 45: p^.name.first := 'edward'; ! 46: p^.ss := 845680539; ! 47: p^.sex := male; ! 48: p^.birth.mo := aug; ! 49: p^.birth.day := 30; ! 50: p^.birth.year := 1941; ! 51: p^.depdts := 1; ! 52: p^.ms := single; ! 53: p^.indepdt := true; ! 54: if pp = p^ then ! 55: writeln(true); ! 56: end.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.