diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-02-12 23:07:52 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-02-12 23:07:52 +1100 |
commit | 348dc88775fac78f5c1afa30c4f00d6d14dff592 (patch) | |
tree | b96db643d0642edf54242da5c672f3096bb98e22 /src/candidates.adb | |
parent | 60b2207a469a5a1e7a7e5619a8eb1b01c67f314a (diff) |
Election counting now works, logging improved from Haskell version, still need to fix exhausted paper collection
Diffstat (limited to 'src/candidates.adb')
-rw-r--r-- | src/candidates.adb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/candidates.adb b/src/candidates.adb index 5d10ce1..40c038a 100644 --- a/src/candidates.adb +++ b/src/candidates.adb @@ -27,6 +27,35 @@ package body Candidates is end To_String; + + + function Candidate_Header + (Delimiter : in Character := ',') + return String is + begin + return "Group" & Delimiter & + "Group Rank" & Delimiter & + "First Name" & Delimiter & + "Last Name" & Delimiter & + "Party"; + end Candidate_Header; + + + + + function Name_And_Party + (Input_Candidate : in Candidate) + return String + is + use type SU.Unbounded_String; + begin + return SU.To_String + (Input_Candidate.First_Name & " " & + Input_Candidate.Last_Name & ", " & + Input_Candidate.Party); + end Name_And_Party; + + end Candidates; |