From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,11b7feb3916b2055,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-28 04:38:33 PST Path: archiver1.google.com!newsfeed.google.com!postnews1.google.com!not-for-mail From: lukepuk@hotmail.com (Luke) Newsgroups: comp.lang.ada Subject: Help - compiler errors Date: 28 Aug 2001 04:38:33 -0700 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 212.137.157.45 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 998998713 10432 127.0.0.1 (28 Aug 2001 11:38:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 28 Aug 2001 11:38:33 GMT Xref: archiver1.google.com comp.lang.ada:12508 Date: 2001-08-28T11:38:33+00:00 List-Id: I am a first year computer science student having problems compiling an important piece of work (GNAT 3.13p). I've got to hand it in soon, and can't get past the problems I've got. Please could anyone try and help. The problem is with line 154 129. Get(CurrentRiderNumber); 130. CurrentRiderTeam := RiderToTeam(2,CurrentRiderNumber); 131. 132. -- get/process/store riders finishtime 133. 134. Get(Hours); 135. Get(Minutes); 136. Get(Seconds); 137. RidersFinish := Hours * 3600 + Minutes * 60 + Seconds; 138. 139. 140. -- Add team time to team array 141. 142. TeamArray(CurrentRiderTeam).NumFinish := TeamArray(CurrentRiderTeam).NumFinish + 1; 143. 144. IF TeamArray(CurrentRiderTeam).NumFinish = 5 THEN 145. TeamArray(CurrentRiderTeam).TeamTime := RidersFinish - TeamArray(CurrentRiderTeam).TeamStartTime; 146. END IF; 147. 148. END LOOP; 149. 150. -- Add finish time to rider array 151. 152. OverallTime := RidersFinish - TeamArray(CurrentRiderTeam).TeamStartTime; 153. 154. RiderArray(CurrentRiderTeam(TeamArray(CurrentRiderTeam).NumFinish),2) := OverallTime; >>> array type required in indexed component >>> too many subscripts in array reference >>> expected type "RiderTimesType" defined at line 29 >>> found type "Standard.Integer" 155. 156. Below are the array declarations and things. 19. TYPE Name IS ARRAY (1..30) OF Character; 20. 21. TYPE TeamStartInfo IS RECORD 22. TeamName : Name; 23. TeamStartTime : Integer; 24. TeamTime : Integer; 25. NumFinish : Integer; 26. END RECORD; 27. 28. TYPE TeamDataType IS ARRAY (1..25) OF TeamStartInfo; 29. TYPE RiderTimesType IS ARRAY (1..8 , 1..2) OF Integer; 30. TYPE RiderDataType IS ARRAY (1..25) OF RiderTimesType; 31. 32. 33. TYPE TeamFinInfo IS RECORD 34. TeamName : Name; 35. TeamTime : Integer; 36. Riders : RiderTimesType; 37. NumFinish : Integer; 38. END RECORD; 39. 40. TYPE FinDataType IS ARRAY (1..25) OF TeamFinInfo; 41. TYPE RiderNonFinType IS ARRAY (1..200) OF Integer; 42. TYPE RiderListType IS ARRAY (1..2 , 1..200) OF Integer; 43. 44. TeamArrayMain : TeamDataType; 45. RiderArrayMain : RiderDataType; 46. TeamsThatFinishMain : FinDataType; 47. TeamsThatDontFinishMain : FinDataType; 48. RidersThatDontFinishMain : RiderNonFinType := (1..200 => 999); 49. RiderToTeamMain : RiderListType; 50. I would be very grateful if anyone could help and I expect I'll be back to this group with my next round of errors I can't solve once I've hopefully sorted this one. Thanks very much Luke Pattison - 1st yr. IT & Business, Aston Uni, UK