comp.lang.ada
 help / color / mirror / Atom feed
From: bering@ace.com (Bering)
Subject: ADA error message ...
Date: Mon, 5 Dec 94 13:42:59 EST
Date: 1994-12-05T13:42:59-05:00	[thread overview]
Message-ID: <912.UUL1.3#25274@ace.com> (raw)



@ >908mangla@wmich.edu}


@ >The following is a .LIS file from an ADA compilation. Can someone expla
@ >error occuring at line 42.

@ >Thanks, Usman

@ >-----------------------------------------------------------------------

@ >CALCULATOR                      Source Listing                  20-NOV-
@ >15:15:42    DEC Ada V3.0A-7                     Page   1
@ >01                                                              20-NOV-
@ >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
@ >8.7]


I take it you are running under VMS on a VAX and that you wish to get user 
inport from the key board.  

You need to declare a file varable for input from the key board.
 

with TEXT_IO;
--
procedure TEST is
--
package INTEGER_IO is new TEXT_IO.INTEGER_IO(INTEGER);
--
TERMINAL : TEXT_IO.FILE_TYPE;
VALUE    : INTEGER;
--
begin -- TEST
  TEXT_IO.OPEN(TERMINAL,TEXT_IO.IN_FILE,"USER_INPUT:");
  TEXT_IO.GET(TERMINAL,VALUE);
  TEXT_IO.PUT("The value you entered was ");
  INTEGER_IO.PUT(VALUE);
  TEXT_IO.NEW_LINE;
end TEST;
 
Hope this helps Joe...



---
 * WR  [NR] * UNREGISTERED EVALUATION COPY



             reply	other threads:[~1994-12-05 18:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-05 18:42 Bering [this message]
1994-12-06  8:55 ` ADA error message Ross Mather
  -- strict thread matches above, loose matches on Subject: below --
1994-11-21 21:40 Bennett, Chip (KTR) ~U
1994-11-20 19:20 908mangla
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox