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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d5958d67eb2c8136 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-06 02:13:33 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!Germany.EU.net!EU.net!sun4nl!mscnoff!mather From: mather@mscn.nl (Ross Mather) Subject: Re: ADA error message ... Message-ID: Date: Tue, 6 Dec 1994 08:55:41 GMT References: <912.UUL1.3#25274@ace.com> Organization: Maritime Simulation Centre Netherlands, Wageningen Date: 1994-12-06T08:55:41+00:00 List-Id: 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.