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-Thread: a07f3367d7,6b1bfc6ba4e8ada,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!news2.euro.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news.skynet.be!195.238.0.222.MISMATCH!newsspl501.isp.belgacom.be!tjb!not-for-mail Date: Wed, 13 May 2009 16:16:40 +0200 From: Olivier Scalbert User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: newbie problem Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4a0ad646$0$2854$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 025aed60.news.skynet.be X-Trace: 1242224198 news.skynet.be 2854 87.65.200.8:53944 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news2.google.com comp.lang.ada:5811 Date: 2009-05-13T16:16:40+02:00 List-Id: Hello, I am doing a little package and I have problems just for writing the specification ... In short, this package should offer services to create sequential files that store stereo sound samples. Here is the code: with Sequential_Io; -- Problem 2 not nice should be hidden but how ? package adasound is type Amplitude_T is new Float; type Frequency_T is new Float; type Time_T is new Float; type Stereo_Amplitude_T is record Left : Amplitude_T; Right: Amplitude_T; end record; type Als_File_T is private; function Als_Create(File_Name: String) return Als_File_T; procedure Als_Write(Als_File: Als_File_T; Stereo_Amplitude: Stereo_Amplitude_T); procedure Als_Close(Als_File: Als_File_T); private package Stereo_Amplitude_Io is new Sequential_Io (Stereo_Amplitude_T); type Als_File_T is record File_Type: Stereo_Amplitude_Io.File_Type; -- Problem 1 !! -- perhaps more stuff later end record; end adasound; Problem 1: it does not compile ! adasound.ads:23:10: completion of nonlimited type cannot be limited adasound.ads:23:10: component "File_Type" of type "Als_File_T" has limited type Problem 2: how to avoid the first "with Sequential_Io;" ? Thanks to help me ! Olivier.