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,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,197f249b225fabe2 X-Google-Attributes: gid103376,public From: johnherro@aol.com Subject: Re: Ada 83 versions of Ada 95 packages Date: 1996/12/25 Message-ID: <19961225001000.TAA19975@ladder01.news.aol.com>#1/1 X-Deja-AN: 205846370 references: <32C058C6.50F3@watson.ibm.com> organization: AOL http://www.aol.com newsgroups: comp.lang.ada x-admin: news@aol.com Date: 1996-12-25T00:00:00+00:00 List-Id: "Norman H. Cohen" writes: >The natural way to implement a Bounded_String type >in Ada 83 is with a record consisting of a fixed-length >string (whose length is the maximum length for the type) >and a current-length component. Yes, and that's exactly what the Ada 83 LRM suggested with its Text_Handler package. The LRM supplies only the specification, but writing the body is less than an hour's work, and some Ada 83 compilers (such as Meridian AdaVantage) come with Text_Handler all ready to use. With my "pseudo unbounded strings" package, you can at least do this: Months : array(1 .. 12) of Unbounded_String := (+"January", +"February" ... ); N : Integer := 5; ... Put_Line(+Months(N)); N(5) := +"The merry, merry month of May"; Put_Line(+Months(N)); However, you're right. To implement Append, etc., you probably first have to convert to String, storing the result in a string that you know is long enough. - John Herro Software Innovations Technology http://members.aol.com/AdaTutor ftp://members.aol.com/AdaTutor