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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32d4b7099c3e0137 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-22 23:57:45 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!freenix!enst.fr!not-for-mail From: sk Newsgroups: comp.lang.ada Subject: Re: C code to Ada Date: Thu, 23 Jan 2003 02:00:33 -0600 Organization: ENST, France Message-ID: References: Reply-To: "comp.lang.ada mail to news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1043308657 2827 137.194.161.2 (23 Jan 2003 07:57:37 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 23 Jan 2003 07:57:37 +0000 (UTC) To: "comp.lang.ada mail to news gateway" Return-Path: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020828 X-Accept-Language: en-us, en X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:33365 Date: 2003-01-23T02:00:33-06:00 Hi, > Personally I think "dummies" should be doing bindings I am trying to give up being clever, I always end up with messes like my original post and, as noted by another poster, the quick part takes longer than doing it the dummy way :-) However, at 2am in the morning, waiting for gcc to compile, I cannot resist ... For the entity with the usenetonym of "chris.danx" : Whoops : exception; function "+"(A, B : Character) return Character is type Byte is mod 2**8; begin return Character'Val ( Byte(Character'Pos(A)) + Byte(Character'Pos(B)) - Byte(Character'Pos(' ')) ); end "+"; function "+"(S1, S2 : String) return String is Result : String (1 .. S1'Length) := (Others => ' '); begin if S1'Length /= S2'Length then raise Whoops; end if; for C in Result'Range loop Result (C) := S1(C) + S2(C); end loop; return Result; end "+"; ... and of course when I stumble across this code two months from now, I will be totally lost wondering why on earth I wanted to add two characters together and subtract a space ? I dare not speculate at the results other than for decoding my e-mail address :-) (chris.danx : I e-mailed you, don't know if I got *your* address correct). -- -- -- Merge vertically for real address -- ------------------------------------ -- s n p @ t . o -- k i e k c c m ------------------------------------