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,72ec0a36bd1bb9d8 X-Google-Attributes: gid103376,public From: David Taylor Subject: Re: sign bit for digits type Date: 1997/02/12 Message-ID: <3301F811.5D09@sg2.ha.hac.com>#1/1 X-Deja-AN: 218298355 References: <5dq6am$5m0$1@lator.cybercom.net> Content-Type: text/plain; charset=us-ascii Organization: Hughes Aircraft Company Mime-Version: 1.0 Newsgroups: comp.lang.ada X-Mailer: Mozilla 2.0 (Macintosh; I; PPC) Date: 1997-02-12T00:00:00+00:00 List-Id: luo@cybercom.net wrote: <> > package A is > type float_32 is digits 6; > end A; > with A; > package B is > function "-" (x, y : A.float_32) renames A."-" return A.float_32; > Real :A.float_32 := -5.0; > end B; > > with A; > with B; > procedure C is > value : A.float_32 := B.Real; > begin > null; > end C; > > What is value equal to, 5.0 or -5.0? > TIA. You clearly didn't compile this. The line: function "-" (x, y : A.float_32) renames A."-" return A.float_32; has incorrect syntax and also doesn't do what you want it to do. You need a "unary" minus: function "-" (x : A.float_32) return A.float_32 renames A."-"; So, Value should be -5.0. Dave Taylor