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=2.3 required=5.0 tests=BAYES_00,FROM_STARTS_WITH_NUMS, INVALID_DATE,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a5e7ffb6489bae15,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-21 07:53:04 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!gumby!wmichgw!908mangla From: 908mangla@wmich.edu Newsgroups: comp.lang.ada Subject: ADA error message ... Message-ID: <1994Nov20.152016.24172@wmichgw> Date: 20 Nov 94 15:20:16 EDT Organization: Western Michigan University Date: 1994-11-20T15:20:16-04:00 List-Id: The following is a .LIS file from an ADA compilation. Can someone explain the error occuring at line 42. Thanks, Usman ----------------------------------------------------------------------------- CALCULATOR Source Listing 20-NOV-1994 15:15:42 DEC Ada V3.0A-7 Page 1 01 20-NOV-1994 15:15:08 DISK$CS:[CS485.908MANGLA]CALC.ADA;43 1 with TEXT_IO; use TEXT_IO; 2 3 procedure CALCULATOR is 4 KEY: CHARACTER:='?'; 5 NUM: FLOAT; 6 7 8 task CALCULATE is 9 entry ADD (X: in FLOAT); 10 entry MUL (X: in FLOAT); 11 entry CLEAR; 12 end CALCULATE; 13 14 task body CALCULATE is 15 TOTAL:FLOAT:=0.0; 16 17 begin 18 loop 19 select 20 accept ADD (X: in FLOAT) do 21 TOTAL := TOTAL + X; 22 end ADD; 23 or 24 accept MUL (X: in FLOAT) do 25 TOTAL := TOTAL * X; 26 end MUL; 27 or 28 accept CLEAR do 29 TOTAL := 0.0; 30 end CLEAR; 31 or 32 terminate; 33 end select; 34 end loop; 35 end CALCULATE; 36 37 procedure CALC is 38 begin 39 while KEY /= '@' loop 40 case KEY is 41 when '+' | '*' => 42 get(NUM); ...................................1 %ADAC-E-INCONRSL, (1) Inconsistency detected during overload resolution [LRM 8.7] %ADAC-I-SUPPMEAN, (1) For procedure call get the meanings considered are Call of procedure specification GET (ITEM : STRING) declared in TEXT_IO at line 121 (discarded because type STRING of formal ITEM is not a possible type of the corresponding actual) Call of procedure specification GET (ITEM : CHARACTER) declared in TEXT_IO at line 114 (discarded because type CHARACTER of formal ITEM is not a possible type of the corresponding actual) Call of procedure specification GET (FILE_TYPE; STRING) declared in TEXT_IO at line 120 (discarded because of too few actual parameters: number of actuals is 1, number of formals is 2) Call of procedure specification GET (FILE_TYPE; CHARACTER) declared in TEXT_IO at line 113 (discarded because of too few actual parameters: number of actuals is 1, number of formals is 2) For NUM the meaning is variable NUM at line 5 of floating-point type FLOAT in predefined STANDARD 43 put_line(" "); 44 when others => null; CALCULATOR Source Listing 20-NOV-1994 15:15:42 DEC Ada V3.0A-7 Page 2 01 20-NOV-1994 15:15:08 DISK$CS:[CS485.908MANGLA]CALC.ADA;43 45 end case; 46 case KEY is ................1 %ADAC-E-NOT_EXHAUSTIVE, (1) Missing values in the range of enumeration type CHARACTER in predefined STANDARD [LRM 3.7.3(3), 4.3(5), 5.4(4)] ',' .. '<' NUL .. ')' '>' .. DEL 47 when '+' => CALCULATE.ADD(NUM); 48 when '*' => CALCULATE.MUL(NUM); 49 when '=' => put(NUM); .......................................1 %ADAC-E-INCONRSL, (1) Inconsistency detected during overload resolution [LRM 8.7] %ADAC-I-SUPPMEAN, (1) For procedure call put the meanings considered are Call of procedure specification PUT (ITEM : STRING) declared in TEXT_IO at line 123 (discarded because type STRING of formal ITEM is not a possible type of the corresponding actual) Call of procedure specification PUT (ITEM : CHARACTER) declared in TEXT_IO at line 116 (discarded because type CHARACTER of formal ITEM is not a possible type of the corresponding actual) Call of procedure specification PUT (FILE_TYPE; STRING) declared in TEXT_IO at line 122 (discarded because of too few actual parameters: number of actuals is 1, number of formals is 2) Call of procedure specification PUT (FILE_TYPE; CHARACTER) declared in TEXT_IO at line 115 (discarded because of too few actual parameters: number of actuals is 1, number of formals is 2) For NUM the meaning is variable NUM at line 5 of floating-point type FLOAT in predefined STANDARD 50 put_line(" "); 51 end case; 52 put(":"); 53 get(KEY); 54 end loop; 55 end CALC; 56 57 begin 58 put_line(" Enter string :"); 59 CALC; 60 end CALCULATOR; 61 PORTABILITY SUMMARY There are no uses of potentially nonportable constructs CALCULATOR Source Listing 20-NOV-1994 15:15:42 DEC Ada V3.0A-7 Page 3 01 20-NOV-1994 15:15:08 DISK$CS:[CS485.908MANGLA]CALC.ADA;43 COMMAND QUALIFIERS ADA/LIS CALC.ADA QUALIFIERS USED /NOANALYSIS_DATA/CHECK/COPY_SOURCE/DEBUG=ALL/ERROR_LIMIT=30/LIST/NOMACHINE_CODE /NODESIGN /NODIAGNOSTICS/LIBRARY=ADA$LIB /LOAD=REPLACE/NOTE_SOURCE/OPTIMIZE=(TIME,INLINE=NORMAL,SHARE=NORMAL)/SHOW=PORTABILITY/NOSMART_RECOMPILATION/NOSYNTAX_ONLY /WARNINGS=(NOCOMPILATION_NOTES,STATUS=LIST,SUPPLEMENTAL=ALL,WARNINGS=ALL,WEAK_WARNINGS=ALL) CALCULATOR Source Listing 20-NOV-1994 15:15:42 DEC Ada V3.0A-7 Page 4 01 20-NOV-1994 15:15:08 DISK$CS:[CS485.908MANGLA]CALC.ADA;43 COMPILER INTERNAL TIMING Phase CPU Elapsed Page I/O seconds seconds faults count Initialization 0.03 0.17 55 12 Parser 0.02 0.05 29 2 Static Semantics 0.08 0.19 163 32 Generic Expansion 0.00 0.00 0 0 Ada Back End 0.00 0.00 0 0 Code Generation-Ada 0.00 0.00 0 0 DST Generation 0.00 0.00 0 0 Smart Recompilation 0.00 0.00 0 0 IL expansion 0.00 0.00 0 0 Optimization 0.00 0.00 0 0 Dominator tree construction 0.00 0.00 0 0 Loop dominator insertion 0.00 0.00 0 0 Lifetime analysis 0.00 0.00 0 0 IDEF computation 0.00 0.00 0 0 DATAFLOW computation 0.00 0.00 0 0 Dependence analysis 0.00 0.00 0 0 Dependence graph building 0.00 0.00 0 0 Dependence cycle processing 0.00 0.00 0 0 DA heuristic weighting 0.00 0.00 0 0 DA loop strategy selection 0.00 0.00 0 0 DA loop contents placement 0.00 0.00 0 0 DA final loop generation 0.00 0.00 0 0 Strength reduction 0.00 0.00 0 0 Loop unroll/Loop optimization 0.00 0.00 0 0 Test replacement 0.00 0.00 0 0 Profitability determination 0.00 0.00 0 0 Profitability reordering 0.00 0.00 0 0 Use propagation 0.00 0.00 0 0 Split lifetime analysis 0.00 0.00 0 0 Base Binding 0.00 0.00 0 0 Base binding - Dataflow 0.00 0.00 0 0 Base-binding - Profitability 0.00 0.00 0 0 Base-binding - Transformation 0.00 0.00 0 0 Code Generation 0.00 0.00 0 0 Context analysis 0.00 0.00 0 0 Register History 0.00 0.00 0 0 Temporary allocation 0.00 0.00 0 0 Code emission 0.00 0.00 0 0 Final 0.00 0.00 0 0 Peepholing 0.00 0.00 0 0 Final flow analysis 0.00 0.00 0 0 Object scheduling 0.00 0.00 0 0 Branch/jump resolution 0.00 0.00 0 0 Object module generation 0.00 0.00 0 0 List Generation 0.00 0.11 3 8 Compilation Library 0.02 0.06 18 6 Writing Units to Library 0.00 0.00 0 0 Analysis Data Collection 0.00 0.00 0 0 Compiler totals 0.16 0.67 328 68 CALCULATOR Source Listing 20-NOV-1994 15:15:42 DEC Ada V3.0A-7 Page 5 01 20-NOV-1994 15:15:08 DISK$CS:[CS485.908MANGLA]CALC.ADA;43 COMPILATION STATISTICS CPU time: 0.16 seconds Elapsed time: 0.67 seconds Pagefaults: 328 I/O Count: 68 Source lines: 61 22875 lines per CPU minute. Compilation complete