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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,40bb6b17805d266b X-Google-Attributes: gid103376,public From: mab@dst1.wdl.loral.com (Mark A Biggar) Subject: Re: How to calculate negative binary?? Date: 1997/03/31 Message-ID: <5hopf0$50q@wdl1.wdl.lmco.com>#1/1 X-Deja-AN: 230418272 References: <01bc3bf9$a8a655e0$d87d8ea1@AaBbCcDd> Organization: Loral Western Development Labs Newsgroups: comp.lang.ada Date: 1997-03-31T00:00:00+00:00 List-Id: In article <01bc3bf9$a8a655e0$d87d8ea1@AaBbCcDd> "Centaury" writes: >Compilation error occurs when I entered the line : >p:=2# - 1010110 # >and is caused by the negative value of the binary. How to correct it? There is no such thing as a negative literal number in Ada, there is just the negation operator applied to a positive literal. This usualy makes no difference as all compilers do the evaluation of the negation operator in such a case at compile time, so what you want to write is: p := -2#1010110#; -- Mark Biggar mab@wdl.lmco.com