From: asmang@CRAZYSPAMmail.wm.edu (Arun Mangalam)
Subject: Re: Type Conversion
Date: 1998/11/03
Date: 1998-11-03T14:14:09+00:00 [thread overview]
Message-ID: <asmang-0311980928100001@192.168.0.22> (raw)
In-Reply-To: 71lbsu$1ps@morgan.vf.lmco.com
In article <71lbsu$1ps@morgan.vf.lmco.com>, Michael Kaufman
<michael.f.kaufman@lmco.com> 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.
next prev parent reply other threads:[~1998-11-03 0:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-01 0:00 Type Conversion Heather Wright
1998-11-01 0:00 ` dewarr
1998-11-01 0:00 ` Tucker Taft
1998-11-02 0:00 ` Michael Kaufman
1998-11-03 0:00 ` Arun Mangalam [this message]
1998-11-06 0:00 ` Niklas Holsti
1998-11-02 0:00 ` Marin David Condic
-- strict thread matches above, loose matches on Subject: below --
2014-10-11 23:56 type conversion compguy45
2014-10-12 0:07 ` compguy45
2014-10-12 0:25 ` compguy45
2014-10-12 0:33 ` Jeffrey Carter
2014-10-12 0:38 ` compguy45
2014-10-12 3:45 ` Jeffrey Carter
2014-10-12 2:32 ` Shark8
2014-10-12 4:53 ` Anh Vo
2014-10-12 4:57 ` Shark8
2014-10-12 5:41 ` Anh Vo
2014-10-12 6:38 ` Jeffrey Carter
2014-10-12 9:37 ` Pascal Obry
2014-10-12 11:54 ` compguy45
2014-10-12 23:05 ` Georg Bauhaus
2014-10-13 5:40 ` Pascal Obry
2014-10-13 7:26 ` Simon Wright
2014-10-13 22:36 ` Randy Brukardt
2014-10-12 9:16 ` Simon Wright
2014-10-12 21:05 ` Shark8
2014-10-12 9:31 ` Simon Wright
1997-12-08 0:00 Type Conversion Nick Davies
1997-12-08 0:00 ` John English
1997-12-09 0:00 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox