TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: John Beckett
from: Ellen K.
date: 2002-11-14 08:03:46
subject: Re: Rounding

From: Ellen K. 

Interesting.   Good to know, I will watch out for this.

Thanks.    :)

On Thu, 14 Nov 2002 09:45:00 GMT, John Beckett
 wrote in message
:

>Ellen K.  wrote in message
>news::
>> I didn't realize integer division was also affected in the way you
>> describe.   What about Mod?
>
>It's not the division so much as the fact the operator (\ in my example)
>wants integer arguments. VB converts the floating point 1.5 to an integer
>before doing the integer divide. The conversion is the same as calling
>CInt. Therefore, 1.5 becomes 2, and 1.5 \ 1 becomes 2.
>
>Like many things in VB, it's sort of understandable, but a shock when you
>first meet it.
>
>Mod also wants integer arguments, so anything else you give it will be
>converted via CInt.
>
>John

--- BBBS/NT v4.01 Flag-4
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/1.45)
SEEN-BY: 3/2 10 106/1 120/544 123/500 379/1 633/260 267 270 285 774/0 605
SEEN-BY: 2432/200
@PATH: 379/1 106/1 123/500 774/605 633/260 285

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.