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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b7e91a32073f0674 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-23 16:33:56 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsgate.cistron.nl!skynet.be!skynet.be!louie!tlk!not-for-mail Sender: lbrenta@lbrenta Newsgroups: comp.lang.ada Subject: Re: whats semicolon? References: <3F983E65.2080407@terra.es> From: Ludovic Brenta User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Date: 24 Oct 2003 01:32:30 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 217.136.1.200 X-Trace: 1066952035 reader1.news.skynet.be 276 217.136.1.200:57195 X-Complaints-To: usenet-abuse@skynet.be Xref: archiver1.google.com comp.lang.ada:1557 Date: 2003-10-24T01:32:30+02:00 List-Id: "@{-_-}@" writes: > with Text_Io, Ada.Integer_Text_IO; > use Text_Io, Ada.Integer_Text_IO; ^^^^^^^ This package is obsolete. It is recommended to use Ada.Text_IO instead. But this will not harm your program until the next revision of Ada. > procedure Practica1 is > > n: integer; > c: integer :=0; ^^^^^^^^^^^^^^^^ You do not need to declare this variable. The "for" loops below will declare it implicitly for you. > begin > put ("Escribe un numero entero: "); > get (n); > if n = 0 then > put("cero") > else > IF N > 0 then > for c in 0..n loop > put (c); > end loop > else > for c in -1..n loop ^^^^^^^^ This loop will be executed zero or one times, depending on n. Do you understand why? Is this whant you want? > put (c); > end loop > end if > end if > end Practica1; Regarding the semicolons, Simon Wright answered already. It looks like you come from Pascal :) HTH -- Ludovic Brenta.