From: Abbo <siconDEL@hotmail.com>
Subject: How casting works in ada?
Date: Tue, 23 Nov 2004 18:26:12 +0100
Date: 2004-11-23T18:26:12+01:00 [thread overview]
Message-ID: <XpKod.8010$C94.2217@tornado.fastwebnet.it> (raw)
Hello! SOrry for this very basic question, but I'd like to know what
happen during a simple casting between types with different size/delta.
Example:
type one is delta 0.003 range -20.0 .. 200.0;
type two is digits 6 range -10.0 .. 400.0;
type three is delta 0.0023142 range -200.0.. 9999.0;
VAR1 : one := 23.0;
VAR2 : two;
VAR3 : three;
VAR2 := two ( VAR1 );
VAR3 := three (VAR1);
which values are in VAR2 and VAR3 and how ADA calculates it?
Why
VAR2 := two(23.0);
gives different value for VAR2 from
VAR2 := two ( VAR1 ); ??
Thanks in advance!!
next reply other threads:[~2004-11-23 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-23 17:26 Abbo [this message]
2004-11-23 19:17 ` How casting works in ada? Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox