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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c1b618c3b35129ab X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-11 04:24:19 PST Path: supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.stanford.edu!arclight.uoregon.edu!enews.sgi.com!telocity-west!TELOCITY!newsrump.sjc.telocity.net!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada References: Subject: Re: logical operations in Ada MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: X-Trace: MzkgTm9BdXRoSXNlciBURUxPX0lUWS1SRUFYRVJPIDIxNi4yMjcuNDcuNDkgIFN1biwgMTEgRmVi!IC4wMDE8MDQ6MjQ6MTcgTFNU X-Abuse-Info: Please forward ALL headers when reporting abuse. X-Complaints-To: abuse@telocity.net NNTP-Posting-Date: Sun, 11 Feb 2001 04:24:17 PST Date: Sun, 11 Feb 2001 06:24:24 -0600 Xref: supernews.google.com comp.lang.ada:5113 Date: 2001-02-11T06:24:24-06:00 List-Id: It is not necessary to use bit-wise logical operations to implement a To_Upper function, since that operation is defined by the language in the package Ada.Characters.Handling, defined in section A.3.2 of the Ada Reference Manual. Logical operations are predefined for Boolean types, modular types, and one-dimensional arrays of Boolean types -- see section 4.5.1 Section 13.8 of the manual describes what are termed Machine Code Insertions in Ada. However, Ada is so powerful and flexible, that Machine Code Insertions are rarely necessary. "Freelancer" wrote in message news:Rhth6.92238$Pm2.1876497@news20.bellglobal.com... > Could anyone tell me how to do basic operation on ASCii characters? > > More specifically, I would like to do a to_upper function for example : > > 'a' becomes 'A' ( a to_upper function) > > 1101 1111 "and" 0110 0001 becomes 0100 0001 (ASCii 'a' becomes ASCII 'A') > ________________________________________ > > I would like to do a bit 'or' or 'and' or 'xor' operations, but I don't know > how... > > Is it possible to define a block of assembly language code in an ada program > as well? > > Thanks in advance. > >