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,f62cfcf04b0e1759,start X-Google-Attributes: gid103376,public From: "John J. Cupak Jr." Subject: Help: Truncating Decimal Types Date: 1997/12/30 Message-ID: <34A9138E.41C67EA6@swl.msd.ray.com>#1/1 X-Deja-AN: 311355725 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: Raytheon Company Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1997-12-30T00:00:00+00:00 List-Id: A student tried to extract the integer portion of a decimal (money) value using Money_Type'Truncation(Cash), and received the GNAT error that the attribute is only for Float types (That's what the ARM says, too). Does anyone have an easy way to extract the integer portion of a decimal number - short of writing a function? Seems Ada should allow this (and other attributes) for fixed and decimal types, but it doesn't without first converting the value to decimal. Thanks -- ---------------------------------------------------------------- - John J. Cupak Jr, CCP - - Raytheon Electronic Systems: Software Engineering Laboratory - - tel: 508-858-1222 email (work): jcj@swl.msd.ray.com - - fax: 508-858-4336 email (home): jcupak@aol.com - ----------------------------------------------------------------