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,9dec3ff1604723d9 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.!newsc.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: Re: Bitmanipulation in Ada References: <87k6vwrwym.fsf@insalien.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: Date: Thu, 19 Aug 2004 19:57:05 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1092945425 217.209.116.179 (Thu, 19 Aug 2004 21:57:05 CEST) NNTP-Posting-Date: Thu, 19 Aug 2004 21:57:05 CEST Organization: Telia Internet Xref: g2news1.google.com comp.lang.ada:2874 Date: 2004-08-19T19:57:05+00:00 List-Id: Jeffrey Carter wrote: > Replace the assignment to I with >=20 > Update_Integer (Value =3D> To_Integer (B) ); You can't send a function result to an in out parameter, can you? Make=20 Update_Integer a function instead: function Updated_Integer(I : Integer) return Integer is begin return I * prime1 mod prime2; end Updated_Integer; =2E... loop declare x : boolean; begin x :=3D b(k); b(k) :=3D b(32 - k); b (32 - k) :=3D x; b :=3D To_Bit_Array(Updated_Integer(To_Integer(b))); end; end loop; --=20 Bj=F6rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu