BSD 1 development
[unix-history] / tests / t14.p
CommitLineData
fde98a2d
BJ
1program rec(output);
2type
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;
28var
29 p: ^person;
30begin
31 new(p);
32 p^.name.last := 'woodyard';
33 p^.name.first := 'edward';
34 p^.ss := 845680539;
35 p^.sex := male;
36 p^.birth.mo := aug;
37 p^.birth.day := 30;
38 p^.birth.year := 1941;
39 p^.depdts := 1;
40 p^.ms := single;
41 p^.indepdt := true;
42end.