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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f30ef262af690ce0 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!storethat.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: numbers as 'generics' parameters Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <482dd91a$1_3@news.bluewin.ch> <1g4p2jgvi3k8j.1j2xk6p9ws3a2.dlg@40tude.net> <9e99c5cd-fd94-4a38-89fd-681c0372b7ad@y38g2000hsy.googlegroups.com> Date: Sat, 17 May 2008 19:34:48 +0200 Message-ID: NNTP-Posting-Date: 17 May 2008 19:34:48 CEST NNTP-Posting-Host: 0160b1dd.newsspool4.arcor-online.net X-Trace: DXC=D]CPlaX>kg0i6K;>iZ]7634IUK[N3BU^1?2hF4 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:167 Date: 2008-05-17T19:34:48+02:00 List-Id: On Sat, 17 May 2008 09:29:34 -0700 (PDT), Maciej Sobczak wrote: > On 17 Maj, 09:47, "Dmitry A. Kazakov" > wrote: > > What about this: > > procedure P (X : in String; Y : in String); > > This procedure accepts two strings of any length - and they can have > different lengths. What about limiting this and allowing the user to > call P only with two strings of the same length? > Declaring a constrained subtype would fix the length to the one used > in type declaration. Is it possible to define P in a way that allows > strings of any length, but equal? How are going to check string length statically? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de