Re: converting single to integer
- From: David Kerber <ns_dkerber@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Sep 2007 08:25:48 -0400
In article <fcop1j$bin$2@xxxxxxxx>, none@xxxxxxx says...
David Kerber wrote:
In article <OitxKgW#HHA.980@xxxxxxxxxxxxxxxxxxxx>,...
rickNOSPAMnews@xxxxxxxxxxxxxxxxx says...
What is the difference between storing a Single in an Integer and "casting"
a Single to an Integer... isn't the end result the same... an Integer?
They're both integers, but have different values.
If by "different value" you mean a differing internal representation for
the same numerical value...
Are you sure about that? I don't know the internal representation of
the various types of numbers, but if you take the bit pattern:
00011010 11100001 00001111 10101010
and interpret it as a Single (assuming it represents a valid Single), I
sincerely doubt it would return the same value as that bit pattern
interpreted as an Integer, which is what you are doing when you use
memcopy to copy from a single to an integer. Or am I completely
misintrepreting the line of this discussion? If you use a Cast, then
you will get the same value, but a different internal bit pattern.
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
.
- Follow-Ups:
- Re: converting single to integer
- From: dpb
- Re: converting single to integer
- References:
- Re: converting single to integer
- From: Rick Rothstein \(MVP - VB\)
- Re: converting single to integer
- From: David Kerber
- Re: converting single to integer
- From: dpb
- Re: converting single to integer
- Prev by Date: Re: do pop up boxes stop all events?
- Next by Date: Re: do pop up boxes stop all events?
- Previous by thread: Re: converting single to integer
- Next by thread: Re: converting single to integer
- Index(es):
Relevant Pages
|