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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c370342fe303517b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!switch.ch!ecngs!feeder2.ecngs.de!212.23.6.68.MISMATCH!zen.net.uk!hamilton.zen.co.uk!feed4.jnfs.ja.net!jnfs.ja.net!xara.net!gxn.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: C Interface example Date: Sun, 04 Feb 2007 11:52:00 +0000 Organization: Pushface Message-ID: References: <1170516037.435847.326440@p10g2000cwp.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1170589919 7382 62.49.19.209 (4 Feb 2007 11:51:59 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 4 Feb 2007 11:51:59 +0000 (UTC) Cancel-Lock: sha1:OnfFtFLf1jpU0xY0d9jWPlslxIc= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:8909 Date: 2007-02-04T11:52:00+00:00 List-Id: "Jeffrey R. Carter" writes: > procedure Add > (To : in out Vector; Using : in Vector; Length : in Natural) > is In your later post you note that Ada can work out the length without needing it as a parameter here. However, in either case I would put in a check that To'Length is equal to Using'Length (and to Length, if supplied). I would probably raise Constraint_Error here (can't use pragma Assert in '95 and be portable).