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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8d8e831905c2cf39,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!f2g2000yqh.googlegroups.com!not-for-mail From: juanmiuk Newsgroups: comp.lang.ada Subject: My first solution Date: Tue, 14 Jun 2011 23:01:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3420583b-a063-4634-9989-580888e38eee@f2g2000yqh.googlegroups.com> NNTP-Posting-Host: 188.221.149.67 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1308117668 12770 127.0.0.1 (15 Jun 2011 06:01:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 15 Jun 2011 06:01:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f2g2000yqh.googlegroups.com; posting-host=188.221.149.67; posting-account=l6y7nQoAAABlM0ixwraR8Luww92dg7v2 User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKRUAELSC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19837 Date: 2011-06-14T23:01:08-07:00 List-Id: with Ada.Strings.Fixed; use Ada.Strings.Fixed; procedure Test_2 is subtype My_Num is Integer range 1 .. 10; function Format_Num ( Width_Num : Integer; The_Number : Integer ) return String is Temp_Length : My_Num := My_Num'Image(The_Number)'Length; Separador : String := (Width_Num - Temp_Length) * ' '; begin return (Separador & My_Num'Image(The_Number)); end Format_Num; begin for I in My_Num range 1 .. 10 loop declare Output : String := Format_Num(My_Num'Width, I); begin Text_IO.Put_Line(Output); end; end loop; end Test_2;