I'm completely stumped as to why I am getting an undefined error when I go to compile this Ada program I am working on. I have looked over it and over it... there are no spelling errors or anything of that nature. Here is what I have, followed by the error I am getting.
Get_Score(CandidateVotes, CurrentCandidate);
end loop;
end Get_Input;
procedure Get_Score(CandVotes: in CurrentCandidate_Votes;
Candidate: in Character) is
-- get the score for the candidate and store it into CandidatesArray
SameAnswers: Integer;
DifferentAnswers: Integer;
CandidateScore: Integer;
begin
for I in VoterArray_Index loop
if Voter(I) /= 0 And CandVotes(I) /= 0 Then
if Voter(I) /= CandVotes(I) Then
DifferentAnswers := DifferentAnswers + 1;
else
SameAnswers := SameAnswers + 1;
end if;
end if;
end loop;
CandidateScore := SameAnswers - DifferentAnswers;
Candidates(Candidate) := CandidateScore;
end Get_Score;
The top part of the code block is where I am calling the Get_Score procedure from another procedure. The types of CandidateVotes and CurrentCandidate are correct. If I should post more, please let me know.
Also, the error reads: candidates.adb:37:25: "Get_Score" is undefined