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: a07f3367d7,3084df62f3637626 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Vinzent Hoefler" Newsgroups: comp.lang.ada Subject: Re: Wrong program structure Date: Sat, 23 Oct 2010 23:16:20 +0200 Message-ID: References: <8ih16gF70rU2@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: individual.net 3GSwELMFHx7rRBSVuSmeCQ5btKiftpw0/cQDhJ+R7v88pKZlLM Cancel-Lock: sha1:2RTzIZug1Bv2RN9QpVMYPdySGSA= User-Agent: Opera Mail/10.62 (Win32) Xref: g2news1.google.com comp.lang.ada:14705 Date: 2010-10-23T23:16:20+02:00 List-Id: On Sat, 23 Oct 2010 23:08:32 +0200, George wrote: > GNAT is complaining about "begin" being used as identifier and a missing > "begin" for procedure "keywords4". The progam structure is like this: > [...] > begin > -- Ada.Command_Line.Argument_Count is "0" if > -- a) Command_Line.Argument_Count is not implemented (Compiler, OS) > -- b) no arguments given > if Ada.Command_Line.Argument_Count > 0 then > for counter in 1..Ada.Command_Line.Argument_Count loop > declare > Arg : constant String := Ada.Characters.Handling.To_Upper > (Ada.Command_Line.Argument(counter)); begin > -- some commands end; > end loop; > else -- if Argument_Count = 0 print help > -- some commands > end if; > end keywords4; You are declaring a block, but its "end" is missing. Vinzent. -- There is no signature.