Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   casting question (http://www.velocityreviews.com/forums/t123907-casting-question.html)

David Eynon 07-01-2003 02:41 AM

casting question
 
quick question. When dividing two variables of different types, is explicit
conversion via casting necessary for accuracy purposes, syntax purposes, or
both? Thanks


--
N0 Spam Ema|l address. Please, when replying directly, delete "NSPAMO" from
email address. Thanks




Ahmed Moustafa 07-01-2003 02:52 AM

Re: casting question
 
David Eynon wrote:
> even quicker clarification of question....variables of primitive types...
> thanks


I think it's both.


Roedy Green 07-01-2003 06:13 AM

Re: casting question
 
On Tue, 01 Jul 2003 02:41:37 GMT, "David Eynon"
<david.eynon@verNSPAMOizon.net> wrote or quoted :

>When dividing two variables of different types, is explicit
>conversion via casting necessary for accuracy purposes, syntax purposes, or
>both? Thanks


Generally not. However, if you do a floating divide in the middle of a
sea of int divides or vice versa, you might point that out with a
nugatory cast.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


All times are GMT. The time now is 10:26 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57