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: 103376,c31849ae55c4fb65 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!l12g2000cwl.googlegroups.com!not-for-mail From: "jimmaureenrogers@worldnet.att.net" Newsgroups: comp.lang.ada Subject: Re: Strings and errors... (gnat) Date: 29 Nov 2006 18:04:37 -0800 Organization: http://groups.google.com Message-ID: <1164852277.688085.175850@l12g2000cwl.googlegroups.com> References: <1164821430.144822.138100@h54g2000cwb.googlegroups.com> NNTP-Posting-Host: 69.170.65.169 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1164852282 32086 127.0.0.1 (30 Nov 2006 02:04:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 30 Nov 2006 02:04:42 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: l12g2000cwl.googlegroups.com; posting-host=69.170.65.169; posting-account=SqOfxAwAAAAkL81YAPGH1JdBwpUXw9ZG Xref: g2news2.google.com comp.lang.ada:7753 Date: 2006-11-29T18:04:37-08:00 List-Id: Robert A Duff wrote: > You can't assign a shorter string into a longer one -- the lengths have > to match. However, you can use the predefined package Ada.Strings.Fixed to move the shorter string into the longer string. The Ada Reference Manual describes the move procedure as: procedure Move (Source : in String; Target : out String; Drop : in Truncation := Error; Justify : in Alignment := Left; Pad : in Character := Space); Note that the package Ada.Strings is defined as: package Ada.Strings is pragma Pure(Strings); Space : constant Character := ' '; Wide_Space : constant Wide_Character := ' '; Length_Error, Pattern_Error, Index_Error, Translation_Error : exception; type Alignment is (Left, Right, Center); type Truncation is (Left, Right, Error); type Membership is (Inside, Outside); type Direction is (Forward, Backward); type Trim_End is (Left, Right, Both); end Ada.Strings; Jim Rogers