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.0 required=5.0 tests=BAYES_00,FORGED_HOTMAIL_RCVD2, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fa32bfdf0265cf3e,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,CP1252 Received: by 10.68.221.4 with SMTP id qa4mr13040136pbc.7.1330381590543; Mon, 27 Feb 2012 14:26:30 -0800 (PST) Path: h9ni16685pbe.0!nntp.google.com!news1.google.com!postnews.google.com!s7g2000vby.googlegroups.com!not-for-mail From: adacrypt Newsgroups: comp.lang.ada Subject: Constrained or Unconstrained Arrays or just my my Ignorance. Date: Mon, 27 Feb 2012 14:20:37 -0800 (PST) Organization: http://groups.google.com Message-ID: <45dc4817-e418-4f2d-96cf-02eaa630064c@s7g2000vby.googlegroups.com> NNTP-Posting-Host: 86.167.232.11 Mime-Version: 1.0 X-Trace: posting.google.com 1330381589 25645 127.0.0.1 (27 Feb 2012 22:26:29 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 27 Feb 2012 22:26:29 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s7g2000vby.googlegroups.com; posting-host=86.167.232.11; posting-account=pmkN8QoAAAAtIhXRUfydb0SCISnwaeyg User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB7.3; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Date: 2012-02-27T14:20:37-08:00 List-Id: In my Ada-95 driven crypto program I want to capture the frequency spread of the ciphertext. I am not sure if I am right or not in what I am doing =96 a =91ploy=92 I use works under certain conditions and then not at all at other times in a different application. This is my method and the source code of my method. CipherText item :=3D 4675432 (say) Q :=3D CipherText; I_Num(Q) :=3D I_Num(Q)+1; SUBTYPE Index_32 IS Integer RANGE MinValue .. MaxValue; TYPE I_CoefficientsNumArray IS ARRAY(Index_32) OF Integer; I_Num : I_CoefficientsNumArray; -- counts the coefficients of the ciphertext. -- Max Value and MinValue are the expected values of any ciphertext as positive integers *I use the value of the current ciphertext element to index the (subscript) corresponding numerically to the array element where it will be stored and I later print out the contents of all the array elements to get the frequency spread of an entire encryption session.. 1) Is this action legit in terms of Ada-95 Reference Manual? I am not experienced enough to know myself. I suspect it might not be quite proper but it works fine! I fear it might just be bug that is working more by good luck than good design by me - I hope this is kosher because I want to go on using it in the future. It works as a procedure in a much larger program ok but does not work at all in a second case 2) below.. 2) When I try using this in a standalone program i.e. as the sole purpose of a dedicated program that is meant to find the frequency spread of any file that is read in experimentally, it definitely does not work. Your advice would be greatly appreciated. I do a lot of crypto work in Ada-95. I use agnat 311.p compiler in Windows XP. - adacrypt