Path: utzoo!utgpu!water!watmath!clyde!ho95e!wcs From: wcs@ho95e.ATT.COM (Bill.Stewart) Newsgroups: comp.unix.wizards Subject: Re: casting to float without converting to float? Message-ID: <1959@ho95e.ATT.COM> Date: 9 Jan 88 05:43:03 GMT References: <11175@brl-adm.ARPA> Reply-To: wcs@ho95e.UUCP (46323-Bill.Stewart,2G218,x0705,) Organization: AT&T Bell Labs 46133, Holmdel, NJ Lines: 16 In article <11175@brl-adm.ARPA> weiser.pa@Xerox.COM writes: :Sigh. I must not have made myself sufficiently clear. Before I get any more :responses to my converting-to-float request, please note that I need to convert :an EXPRESSION. The UNION examples don't help. Declare the union somewhere within the scope you need (global if you must), and use a comma operator if there's no cleaner way to express things. union { int i; float f; } intfloat; target = ( intfloat.i = messy()->expr , intfloat.f ) ; Remember the parentheses around the comma expression. I tried this, and lint didn't even mind. -- # Thanks; # Bill Stewart, AT&T Bell Labs 2G218, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs