Skip to content

Commit

Permalink
Read employees into employees array.
Browse files Browse the repository at this point in the history
After this we'll have to begin sorting into states, plants, and depts.
  • Loading branch information
nuclearsandwich committed Aug 28, 2012
1 parent bde68a2 commit 92f7d6b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Widgets.pas
@@ -1,6 +1,7 @@
PROGRAM Widgets;
CONST
nullb = #0;
LF = #10;

TYPE
textfield = packed array [1..64] of char;
Expand All @@ -12,16 +13,18 @@
name : textfield;
plant : integer;
state : integer;
widgetcount : integer;
END;

department = array [1..12] of employee;
plant = array [1..12] of department;
state = array [1..12] of plant;

VAR
empl : employee;
world : array [1..12] of state;
ch : char;
empl : employee;
employees : array [1..12] of employee;
world : array [1..12] of state;
emplcount : integer;

PROCEDURE readempl;
PROCEDURE readname;
Expand Down Expand Up @@ -76,5 +79,12 @@
END;

BEGIN
readempl;
emplcount := 1;
REPEAT
readempl;
writeempl;
employees[emplcount] := empl;
inc(emplcount);
read(ch);
UNTIL eof;
END.

0 comments on commit 92f7d6b

Please sign in to comment.