summaryrefslogtreecommitdiff
path: root/src/candidates.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-02-06 13:34:23 +1100
committerJed Barber <jjbarber@y7mail.com>2017-02-06 13:34:23 +1100
commit8f2f6a5e2074a5da684f9f1a5f5e8f3c51a82b76 (patch)
tree2b11d86d759867e35db6489743355d2761c5bb53 /src/candidates.adb
parentc2f324ac23ea143dfea308229f0ac0376ed4f745 (diff)
More or less completed main procedure, fixed some bugs
Diffstat (limited to 'src/candidates.adb')
-rw-r--r--src/candidates.adb7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/candidates.adb b/src/candidates.adb
index bb09a40..33d3901 100644
--- a/src/candidates.adb
+++ b/src/candidates.adb
@@ -31,8 +31,9 @@ package body Candidates is
procedure Read_Candidates
- (Filename, State : in String;
- Candidate_List : out Candidate_Vector)
+ (Filename : in String;
+ State : in State_Name;
+ Candidate_List : out Candidate_Vector)
is
package My_CSV is new CSV;
use Ada.Text_IO;
@@ -53,7 +54,7 @@ package body Candidates is
-- AEC Senate candidate data is arranged in csv format
if Current_Record.Length = 25 and then
Current_Record.Element (2) = "S" and then
- Current_Record.Element (3) = State
+ Current_Record.Element (3) = State_Name'Image (State)
then
Current_Candidate :=
(First_Name => Current_Record.Element (8),