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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9ae5f4553aae9277 X-Google-Attributes: gid103376,public From: johnherro@aol.com Subject: Re: What's wrong with this syntax? Date: 1996/12/05 Message-ID: <19961205202700.PAA05180@ladder01.news.aol.com>#1/1 X-Deja-AN: 202554389 references: <584kr9$84s@hacgate2.hac.com> organization: AOL http://www.aol.com newsgroups: comp.lang.ada x-admin: news@aol.com Date: 1996-12-05T00:00:00+00:00 List-Id: John Gluth writes: >Some_Limit : Constant := 1024; > ... >for i in 1..(Some_Limit - 2) loop > >It doesn't seem to want to evaluate the (Some_Limit - 2) expression. If I'm not mistaken, your code should work with Ada 95, but not with Ada 83, which doesn't allow universal integer EXPRESSIONS in ranges when the type isn't explicitly stated. For the same reason, in Ada 83 you can't write for I in -1 .. 1 loop, because -1 is an expression. Is the compiler you mentioned Ada 83? If so, you can fix the code either by writing Some_Limit : constant Integer := 1024; or by writing for I in Integer range 1 .. (Some_Limit - 2) loop or by writing both. I hope this helps. - John Herro Software Innovations Technology http://members.aol.com/AdaTutor ftp://members.aol.com/AdaTutor