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: 103376,5c8805625bf2ecaa,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!news.glorb.com!news-stoc.telia.net!news-stoa.telia.net!telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: sv, sv-se, sv-fi, en-gb, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: I wish I could ... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: Date: Thu, 16 Sep 2004 18:11:56 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1095358316 217.209.116.179 (Thu, 16 Sep 2004 20:11:56 CEST) NNTP-Posting-Date: Thu, 16 Sep 2004 20:11:56 CEST Organization: Telia Internet Xref: g2news1.google.com comp.lang.ada:3779 Date: 2004-09-16T18:11:56+00:00 List-Id: Right now I'm writing code like this in several places: case Going is when Forward =3D> for Pos in 1 .. Source.Last loop if Source.Reference.all (Pos) /=3D Character'Pos(Space) then= return Pos; end if; end loop; when Backward =3D> for Pos in reverse 1 .. Source.Last loop if Source.Reference.all (Pos) /=3D Character'Pos(Space) then= return Pos; end if; end loop; end case; I wish I could just write: for Pos in Going 1 .. Source.Last loop if Source.Reference.all (Pos) /=3D Character'Pos(Space) then return Pos; end if; end loop; --=20 Bj=F6rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu