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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,18f7cf743c6dec5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-21 13:12:11 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!enst!enst.fr!not-for-mail From: "Beard, Frank" Newsgroups: comp.lang.ada Subject: RE: Strings Date: Thu, 21 Dec 2000 16:09:47 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 977433073 84405 137.194.161.2 (21 Dec 2000 21:11:13 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 21 Dec 2000 21:11:13 +0000 (UTC) To: "'comp.lang.ada@ada.eu.org'" Return-Path: X-Mailer: Internet Mail Service (5.5.2448.0) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0beta5 Precedence: bulk List-Id: comp.lang.ada mail<->news gateway Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: supernews.google.com comp.lang.ada:3336 Date: 2000-12-21T16:09:47-05:00 Jef, > I just want a usable string. How would I change the above code to do > this? And could someone please point me to a site that gives actual, > concrete examples of simple string use? While Ada.Strings.Bounded has some useful features, it goes a little beyond "simple" strings. Is what you are really looking for: Option 1) with Ada.Text_IO; procedure My_Strings is -- Anonymous string fixed at 9 characters a1 : string := "Some Text"; begin Ada.Text_IO.Put(a1); Ada.Text_IO.New_Line; -- Ada.Text_Io.Put_Line(a1) ~ Put and New_Line. end My_Strings; Or Option 2) with Ada.Text_IO; procedure My_Strings is -- Anonymous string fixed at 80 characters a1 : string (1..80) := "Some Text" & (10 .. 80 => ' '); begin Ada.Text_IO.Put_Line(a1); end My_Strings; Or Option 3) with Ada.Text_IO; procedure My_Strings is -- Subtype of string fixed as 80 characters subtype Bounded_80 is string (1..80); a1 : Bounded_80 := "Some Text" & (10 .. 80 => ' '); begin Ada.Text_IO.Put_Line(a1); end My_Strings; Frank