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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!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!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Function definitions References: <610b9d5b-a9a5-464d-9de3-b2f754f58cff@googlegroups.com> <7597c304-0dc2-41ad-b04e-1aef133e5b63@googlegroups.com> <49b56788-d1a4-4304-9e0c-b12336a7512c@googlegroups.com> Date: Sat, 21 Jun 2014 15:56:20 -0500 Message-ID: <85r42iugln.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) Cancel-Lock: sha1:J0gAQNgRCZiZ/duEQiuV2qiOQ6A= MIME-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 1a92e53a5f177eef2f4a312511 X-Received-Bytes: 1519 X-Received-Body-CRC: 851673395 Xref: news.eternal-september.org comp.lang.ada:20495 Date: 2014-06-21T15:56:20-05:00 List-Id: Adam Beneschan writes: > First of all, if you want the bounds of Individual to be flexible, > you'll need to make Individual a discriminant record: > > > type Individual (P, Q, R : Natural) is record > X : x_array (0..P); > Y : y_array (0..Q); > Z : z_array (0..R); > end record; or make Search generic: generic P,Q,R : Natural; package Search is ... type Individual is record X : x_array (0..P); Y : y_array (0..Q); Z : z_array (0..R); end record; ... end Search; Then you have to instantiate Search in main_search.adb. Which is better depends on many other things, in the full application. -- -- Stephe