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 autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx16.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:30.0) Gecko/20100101 Thunderbird/30.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Quick question regarding limited type return syntax References: <166aaec5-5e9c-40e0-9b07-9b9c7d5f7f33@googlegroups.com> In-Reply-To: <166aaec5-5e9c-40e0-9b07-9b9c7d5f7f33@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Thu, 31 Jul 2014 00:48:36 UTC Organization: TeraNews.com Date: Wed, 30 Jul 2014 18:48:34 -0600 X-Received-Bytes: 1565 X-Received-Body-CRC: 889278985 X-Original-Bytes: 1580 Xref: number.nntp.dca.giganews.com comp.lang.ada:188056 Date: 2014-07-30T18:48:34-06:00 List-Id: On 30-Jul-14 17:51, NiGHTS wrote: > return Object (Connection_String'Access) do null; end return; That should be return Object'(Connection_String'Access); the extended-return is the form return object:type [:= value] do sequence_of_statements end return; as you can see there's no 'do' there -- which is what the compiler was complaining about: there was no ';' between the value and "do". > return Object (Connection_String'Access); The reason this is failing is because it's reading the parens as conversion, not qualification -- for qualification you need a "'"; personally I'm a fan of using named parameters when using qualification and generating objects. return Object'(Parameters => Connection_String'Access, others => <>);