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,ac48cedaf5c5cba3 X-Google-Attributes: gid103376,public From: je@bton.ac.uk (John English) Subject: Re: Integer truncation and other recipes Date: 1996/06/04 Message-ID: #1/1 X-Deja-AN: 158340099 references: <4nv3tmINNql5@oasys.dt.navy.mil> organization: University of Brighton, UK newsgroups: comp.lang.ada Date: 1996-06-04T00:00:00+00:00 List-Id: Jon S Anthony (jsa@organon.com) wrote: : In article <4nv3tmINNql5@oasys.dt.navy.mil> shedlars@oasys.dt.navy.mil (Paul S : > In Ada, how do you convert from a real to an integer by truncation? : > That is, how would you convert a value such as 1.9 to 1? : Go to index and find entry: : Truncation attribute Fine for floating point types, but you're out of luck if you want to truncate *fixed point* types, for which the 'Truncation attribute isn't available... -- ---------------------------------------------------------------------------- John English , Dept. of Computing, University of Brighton "Disks are divided into sex and tractors..." ----------------------------------------------------------------------------