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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86cefd3e84a541f2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-18 13:05:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsgate.cistron.nl!amsnews01.chello.com!surfnet.nl!star.cs.vu.nl!not-for-mail From: "R. Stegers" Newsgroups: comp.lang.ada Subject: Re: Parallel Merge Sort Date: Mon, 18 Feb 2002 22:02:23 +0100 Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Message-ID: References: <0sgb8.36$hk2.28284109@newssvr14.news.prodigy.com> NNTP-Posting-Host: kits.cs.vu.nl X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:20114 Date: 2002-02-18T22:02:23+01:00 List-Id: Maybe someone can help me solve one final little issue. The parallel Merge Sort works fine now. But when I want to use it I cannot directly declare for example an integer array: package IntSort is new SORT_PACKAGE(integer, compareInt); use IntSort; -- This declaration does not work when I want to use ar as a parameter in a call to Sort. ar : integer array(1..3); -- Instead I have to use this. ar : IntSort.element_array(1.. 3); sort(ar); This is the declaration of the package: generic type element_type is private; with function "<=" (element1, element2 : element_type) return Boolean; package SORT_PACKAGE is type element_array is array(integer range <>) of element_type; procedure Sort(InArray : in out element_array); < ... > end SORT_PACKAGE; I figured that since 'type' creates a new type, which cannot be interchanged (?) with the original type I would have to use Subtype instead. Unfortunately the compiler won't accept... It's only a minor issue but if you want to do it right... Does anybody know if it's possible??