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=unavailable autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: How to get this space away? Date: Tue, 02 Jun 2015 15:28:31 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 2 Jun 2015 22:27:20 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a3855fbfe1a666be9aefba0563039ed5"; logging-data="26446"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vhQ3LeZJGHJhyCu0MHIDUSjXP7YOeKZc=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: Cancel-Lock: sha1:MnQY3l2NJHVsBN2pIXC2ymHEsF8= Xref: number.nntp.giganews.com comp.lang.ada:193450 Date: 2015-06-02T15:28:31-07:00 List-Id: On 06/02/2015 01:32 PM, Laurent wrote: > > rtAST-N237|rr 12345678|t1 1|o1strpne|ra|a1am|a3<=2|a4+| > ^-------------^ > The function which generates this string: > > -------------- > -- To_BCI -- > -------------- > function To_BCI (Item : Carte) return V_String.Bounded_String is > V_Antibiotiques : V_String.Bounded_String; > V_Carte : V_String.Bounded_String; > V_Germe : V_String.Bounded_String; > use V_String; > begin > > -- generates the |rr 12345678 par; Lot is a Positive > V_Carte := ((+"|ta|rt") & (+Item.Code_SIL) & (+"|rr") & (+Item.Lot'Img)); 'Img is GNAT-specific attribute that is equivalent for T'Image (Object), where T is the type of Object. Since you say Lot is a Positive, that means Item.Lot'Img is equivalent to Integer'Image (Item.Lot). 'Image always adds a leading space for a non-negative value. Nobody seems to like it, but the ARG won't change it. You can get rid of the space yourself, or you could use something like PragmARC.Images that gives you control over width, base, and zero filling. The PragmAda Reusable Components are available from https://pragmada.x10hosting.com/pragmarc.htm -- Jeff Carter "Frankie Wolf, wanted by Federal authorities for dancing with a mailman." Take the Money and Run 143