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!mx02.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: passing parametars as determinants Date: Wed, 22 Oct 2014 06:22:01 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="71797db6fbf0039ebda7a9c799ddb33f"; logging-data="32566"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19daRE+HG3sBfncQEeQJWfawFz2Rns9cAQ=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:KDkh23L5MVo8HHruuuSGDBymNnk= sha1:nOeigOADVrpTEGnI/XSF3D8MVZs= Xref: news.eternal-september.org comp.lang.ada:22647 Date: 2014-10-22T06:22:01+01:00 List-Id: compguy45@gmail.com writes: > I have task type such as... > > task type myTaskType (a: Integer; b: Integer); > > I have type..... > > type myOtherType is array (1 ..N-1) of String (1..N); > > I would like to pass array of myOtherType into my task type > declaration like this... > > task type myTaskType (a: Integer; b: Integer; c : myOtherType); ?? > > Is there way to do this? ARM 3.7(1)[1] says "A discriminant of an object is a component of the object, and is either of a discrete type or an access type." An array is not a discrete type: but you can use an access-to-array, task type myTaskType (a: Integer; b: Integer; c : access myOtherType); [1] http://www.ada-auth.org/standards/12rm/html/RM-3-7.html#p1