Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.lang.c Subject: Re: C Floating point arithmetic Message-ID: <4671@alice.UUCP> Date: Fri, 6-Dec-85 09:15:22 EST Article-I.D.: alice.4671 Posted: Fri Dec 6 09:15:22 1985 Date-Received: Sat, 7-Dec-85 04:35:48 EST References: <322@brl-tgr.ARPA> Organization: Bell Labs, Murray Hill Lines: 23 >> K+R says you can convert any pointer to an int and back again without >> wrecking it. > That is NOT what it says. No, it's not quite, but it's extremely close. Page 210, sec. 14.4: A pointer may be converted to any of the integral types large enough to hold it. Whether an int or a long is required is machine dependent. The mapping function is also machine dependent, but is intended to be unsurprising to those who know the addressing structure of the machine. Details for some particular machines are given below. An object of integral type may be explicitly converted to a pointer. The mapping always carries an integer converted from a pointer back to the same pointer, but is otherwise machine dependent. Thus, you can convert any pointer to a long and back again without wrecking it, and you can use an int instead of a long on some machines.