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,991f222102c1cd00 X-Google-Attributes: gid103376,public From: asmang@CRAZYSPAMmail.wm.edu (Arun Mangalam) Subject: Re: Type Conversion Date: 1998/11/03 Message-ID: #1/1 X-Deja-AN: 407924495 Distribution: world References: <71g71d$r7d@news3.force9.net> <71lbsu$1ps@morgan.vf.lmco.com> X-Complaints-To: abuse@rcn.com X-Trace: 9xpluSASS/vF0D6cgaGT+XoTFpG5qjlP/Jwb5ofZnjU= Organization: William & Mary NNTP-Posting-Date: 3 Nov 1998 14:14:09 GMT Newsgroups: comp.lang.ada Date: 1998-11-03T14:14:09+00:00 List-Id: In article <71lbsu$1ps@morgan.vf.lmco.com>, Michael Kaufman wrote: >Hi, > >In general type conversions look much like function calls, where the >destination type is the "function". For example: > > procedure A_Test is > > A_Integer : Integer := 10; > A_Float : Float := 10.0; > > begin > > A_Integer := Integer(A_Float); -- Converts the float to an integer. > A_Float := Float(A_Integer); -- Converts the integer to a float. > > end A_Test; > >Note that the cast from float to integer will round. > So, if A_Float contains the number 10.5 initially, A_Integer will equal 11? I am asking because with my C background I would have thought A_Integer would equal 10, because in C the fractions are truncated out. -- asmang@CRAZYSPAMmail.wm.edu remove the CRAZYSPAM to reply. These spamming buggers are really annoying.