From: mather@mscn.nl (Ross Mather)
Subject: Re: ADA error message ...
Date: Tue, 6 Dec 1994 08:55:41 GMT
Date: 1994-12-06T08:55:41+00:00 [thread overview]
Message-ID: <D0Dssu.2vG@mscn.nl> (raw)
In-Reply-To: 912.UUL1.3#25274@ace.com
In article <912.UUL1.3#25274@ace.com> bering@ace.com (Bering) writes:
>
>@ > 1 with TEXT_IO; use TEXT_IO;
>@ > 2
>@ > 3 procedure CALCULATOR is
>@ > 4 KEY: CHARACTER:='?';
>@ > 5 NUM: FLOAT;
>@ > 6
>@ > 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;
>
I would have replied to this via e-mail, but the original posters address
appeared to be mangled.
IF this is running under VAX/VMS then the above will apply at least partially.
The most obvious error that was made was by not including the line:
package FLOAT_IO is new TEXT_IO.FLOAT_IO ( FLOAT ) ;
THe error was generated because the compiler searched the context and located
the with and use clauses for TEXT_IO. Therefore the get call would be for a
character or a string and with the variable being a float the compiler just gets
very confused.
For more info on Get functions and Float IO look in section 14.3 of the Ada83
LRM.
cheers
Ross
--
Ross M. Mather mather@mscn.nl, rmt@dasc.nl
I speak for me, and me alone. Canter & Siegel please take note.
Rugby isn't a way of life, it's more important than that.
next prev parent reply other threads:[~1994-12-06 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-12-05 18:42 ADA error message Bering
1994-12-06 8:55 ` Ross Mather [this message]
-- 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