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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:ad4:4870:: with SMTP id u16mr66230189qvy.174.1564212723905; Sat, 27 Jul 2019 00:32:03 -0700 (PDT) X-Received: by 2002:a9d:76ce:: with SMTP id p14mr51216575otl.342.1564212723637; Sat, 27 Jul 2019 00:32:03 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!b26no6879833qtq.0!news-out.google.com!a5ni84qtd.0!nntp.google.com!b26no6879828qtq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 27 Jul 2019 00:32:03 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.31.227.170; posting-account=_-1HTgoAAADHBS5P7Uw6znR8Rsn20H8O NNTP-Posting-Host: 213.31.227.170 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <64bf79fa-b330-416f-9deb-de3f0830d994@googlegroups.com> Subject: ambiguous expression (cannot resolve "Put") From: cryintothebluesky@gmail.com Injection-Date: Sat, 27 Jul 2019 07:32:03 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56971 Date: 2019-07-27T00:32:03-07:00 List-Id: Hi, could anyone suggest how to print 'Size attribute for various integers?= There seems to be an issue with overloaded Put() function. Not sure why on= ly 'Size attribute causes this issue, other attributes like 'First and 'Las= t seem OK. I suppose I could do something like Ada.Integer_Text_IO.Put() an= d Ada.Short_Integer_Text_IO.Put() but this doesn't look very nice.=20 with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Short_Integer_Text_IO; use Ada.Short_Integer_Text_IO; procedure Integer_Types is begin Put("Integer'Size "); Put(Integer'Size); New_Line; Put("Integer'First "); Put(Integer'First); New_Line; Put("Integer'Last "); Put(Integer'Last); New_Line; Put("Short_Integer'Size "); Put(Short_Integer'Size); New_Line; Put("Short_Integer'First "); Put(Short_Integer'First); New_Line; Put("Short_Integer'Last "); Put(Short_Integer'Last); New_Line; end Integer_Types; Compile [Ada] integer_types.adb integer_types.adb:13:38: ambiguous expression (cannot resolve "Put") integer_types.adb:13:38: possible interpretation at a-tiinio.ads:66, instan= ce at a-siteio.ads:18 integer_types.adb:13:38: possible interpretation at a-tiinio.ads:66, instan= ce at a-inteio.ads:18 integer_types.adb:17:38: ambiguous expression (cannot resolve "Put") integer_types.adb:17:38: possible interpretation at a-tiinio.ads:66, instan= ce at a-siteio.ads:18 integer_types.adb:17:38: possible interpretation at a-tiinio.ads:66, instan= ce at a-inteio.ads:18 gprbuild: *** compilation phase failed