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.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_WORDY,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cf6d7cfa23391bce,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-11 06:02:06 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!de452.d.pppool.DE!not-for-mail From: "Ute" Newsgroups: comp.lang.ada Subject: Problem with visibility of generic package help please Date: Thu, 11 Dec 2003 15:03:47 +0100 Message-ID: NNTP-Posting-Host: de452.d.pppool.de (80.184.228.82) X-Trace: news.uni-berlin.de 1071151325 1065149 80.184.228.82 ([209803]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:3363 Date: 2003-12-11T15:03:47+01:00 List-Id: hello, I'm trying to instantiate a generic package with doesn't become visible in the main program. However, the specifiacation of the package and the package body do separately compile without errors. I am using GNAT. The specifiaction is as follows: generic --generisches Element: entweder float oder integer zur Laufzeit type Elem is private; with function ">"(X, Y: Elem) return boolean; with procedure put(X: Elem); with procedure get(X: Elem); package generic_sort is type ArrTyp is array (1..10) of Elem; procedure swap (X, Y: in out Elem); procedure sort(Arr: in out ArrTyp); procedure put_array(Arr: in ArrTyp); procedure get_array(Arr: out ArrTyp); end generic_sort; The main program, where it does not become visible: with Ada.Text_IO; use Ada.Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with generic_sort; procedure generic_sort_demo is package int_arrr_sort is new generic_sort(Integer, ">", put, get); use int_arr_sort; Arr: ArrTyp; begin put("Bitte geben Sie die Feldwerte ein!"); get_array(Arr); new_line; put("Das unsortierte Array: "); put_array(Arr); new_line; sort(Arr); put("Das sortierte Array: "); put_array(Arr); new_line; end generic_sort_demo; I can't find the error?? Thanx, ute