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 X-Google-Thread: 103376,2f343e3986ead102 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!feeder.erje.net!news.motzarella.org!motzarella.org!not-for-mail From: =?ISO-8859-1?Q?S=E9bastien?= Newsgroups: comp.lang.ada Subject: Re: String declaration and initialization Date: Thu, 22 May 2008 16:47:44 +0000 Organization: A noiseless patient Spider Message-ID: <4835A3B0.4010101@gmail.com> References: <1sx14jlsjttyu$.me8s3y39ipru.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: feeder.motzarella.org U2FsdGVkX19K+7xYctKi+mz0074A/sPzsrA/Wl0IZOpg3zMcfrrK9PmmrjH9x8eaRGueC62VI3JB8qimEYadGf/X6NlPfaFp9fZZcW6Uwr/grgBjNOcEwDkqgRvm8o+hgU7n6S0RXTpO+CAi61es3w== X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Thu, 22 May 2008 16:47:46 +0000 (UTC) In-Reply-To: X-Auth-Sender: U2FsdGVkX18awbBq63k+vCxxt9XqP1M6sXHVP1UzuI+bAsman/Fu6g== Cancel-Lock: sha1:cWIfxBDtmmeafM4TXZ5yEzjaaIU= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) Xref: g2news1.google.com comp.lang.ada:290 Date: 2008-05-22T16:47:44+00:00 List-Id: > declare > function Test return String is -- Ada has scoped subprograms > begin > case Some_Test is > when Test_1 => return "Test1"; > ... > end case; > end Test; > Buffer: constant String := Test; > begin > My_Treatment_1 (Buffer); > ... Good idea, but there are some other treatments in the case actually. something like: buffer := test1; buffer_type := 3; and so on. So if I use another function, I have to implement 2 cases in order to do it.