Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!crdgw1!underdog!volpe From: volpe@underdog.crd.ge.com (Christopher R Volpe) Newsgroups: comp.lang.c Subject: Re: Assinging values to type float Message-ID: <11583@crdgw1.crd.ge.com> Date: 3 Sep 90 23:05:24 GMT References: <90240.003415RHMCSUPV@MIAMIU.BITNET> <667.26da7736@iccgcc.decnet.ab.com> <11394@crdgw1.crd.ge.com> <1258@kubix.kub.nl> Sender: news@crdgw1.crd.ge.com Reply-To: volpe@underdog.crd.ge.com (Christopher R Volpe) Lines: 16 In article <1258@kubix.kub.nl>, mad-2@kub.nl (C. Wekx) writes: |>I don't understand what the fuss is all about as a well-known C-author, |>H. Schildt writes in his book 'C: The complete reference' on page 40: |>float f=123.23, without an explicit type cast.... This raises a question I've been wondering about for a while: When we say that a float (or char) gets converted to a double (or int) in an expression, what exactly constitutes an expression? Is a single value on the RHS of an assignment operator an "expression" for conversion purposes? Or is at least one operator required? If I do a "f1=f2", does it first convert f2 to double and then back to float in order to do the assignment? How about "c1=c2" for chars? ================== Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com