| 1 |
program adt(input,output); |
| 2 |
type buffer_type = |
| 3 |
record |
| 4 |
length : integer; |
| 5 |
buf : array[1..100] of char; |
| 6 |
end; |
| 7 |
type complex_type = record r,i : real; end; |
| 8 |
|
| 9 |
bigbuf : buffer_type; |
| 10 |
|
| 11 |
procedure buf_init (var b : buffer_type ) {Body of buf_init} |
| 12 |
procedure buf_add (var b : buffer_type; ch : char) {Body of buf_add} |
| 13 |
procedure buf_get (var b : buffer_type; var ch : char) {Body of buf_get} |
| 14 |
procedure cm_set (var c: complex_type; a,b: real) {Body of cm_set} |
| 15 |
procedure cm_add (a,b: complex_type; var c: complex_type) {Body of cm_add} |
| 16 |
{Other procedures and functions} |
| 17 |
|
| 18 |
begin startproc; end. |