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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3c51e088ba4e71cc X-Google-Attributes: gid103376,public From: jsa@alexandria (Jon S Anthony) Subject: Re: Novice child package question Date: 1997/04/18 Message-ID: #1/1 X-Deja-AN: 235820302 Distribution: world References: <3357ac7d.5108745@netnews.worldnet.att.net> Organization: PSI Public Usenet Link Newsgroups: comp.lang.ada Date: 1997-04-18T00:00:00+00:00 List-Id: In article <3357ac7d.5108745@netnews.worldnet.att.net> draig@ix.netcom.com (Foucault) writes: > STRING.ADB:14:11: warning: file name does not match unit name, should > be "usestring.adb" Unless you request otherwise (see gnatinfo) GNAT wants 1 unit per file and the name of unit should match the name of the file (or vice-versa). > Is there a relatively simple solution to what must be a rather basic > question? More or less. Try this: WITH Ada.Text_IO; USE Ada.Text_IO; WITH Ada.Integer_Text_IO; USE Ada.Integer_Text_IO; WITH Ada.Strings; USE Ada.Strings; WITH Ada.Strings.Bounded; USE Ada.Strings.Bounded; Procedure UseString is package Bounded_80 is new Ada.Strings.Bounded.Generic_Bounded_length(80); use Bounded_80; sentence :string(1..80); senlength:integer; Begin put_line("Enter a text string:"); get_line(sentence, senlength); put_line(sentence(1..senlength)); Put_Line(To_String( Replace_Slice(To_Bounded_String(Sentence(1..Senlength)), 8,11,"AdA!"))); end UseString; > Thanks for any enlightenment bestowed upon me, You're welcome. /Jon -- Jon Anthony Organon Motives, Inc. Belmont, MA 02178 617.484.3383 jsa@organon.com