comp.lang.ada
 help / color / mirror / Atom feed
* How to get this space away?
@ 2015-06-02 20:32 Laurent
  2015-06-02 20:53 ` Simon Wright
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Laurent @ 2015-06-02 20:32 UTC (permalink / raw)


Hi

My little program is slowly generating something which looks like the communication file I need.

The only problem is that if the values I use are of the type integer I get a leading space I don't want/need. I have no idea where it comes from or how to get rid of it in this case.

Standart Integer_IO would be Width=>0 and problem solved but here?

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)); 

-- generates the |t1 1|o1strpne part
      V_Germe := Germes.IO.To_BCI (Item.Germe); 
      V_String.Append(Source => V_Carte,New_Item => V_Germe);

      for Counter in 1 .. Item.Anti_Counter loop
         V_Antibiotiques := Antibiotiques.IO.To_BCI (Item.Antibiotiques (Counter));
         V_String.Append (Source   => V_Carte, New_Item => V_Antibiotiques);
      end loop;
      return V_Carte;
   end To_BCI;

Thanks

Laurent

        

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-06-09 14:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 20:32 How to get this space away? Laurent
2015-06-02 20:53 ` Simon Wright
2015-06-03 18:59   ` Laurent
2015-06-03 19:30     ` Simon Wright
2015-06-02 22:28 ` Jeffrey R. Carter
2015-06-03 19:07   ` Laurent
2015-06-03 20:50     ` J-P. Rosen
2015-06-03 23:00       ` Randy Brukardt
2015-06-05  9:26         ` Stephen Davies
2015-06-08 12:33         ` Brad Moore
2015-06-08 19:47           ` Randy Brukardt
2015-06-08 20:25             ` Jeffrey R. Carter
2015-06-09 14:38               ` Brad Moore
2015-06-04  9:37       ` Georg Bauhaus
2015-06-04 12:32         ` Dmitry A. Kazakov
2015-06-05 13:02       ` Laurent
2015-06-06  0:02         ` Dennis Lee Bieber
2015-06-03  7:28 ` Dmitry A. Kazakov
2015-06-03 19:19   ` Laurent
2015-06-08 22:43 ` wowwomenonwheels205

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox