Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!uunet!mnemosyne.cs.du.edu!isis.cs.du.edu!ebergman From: ebergman@isis.cs.du.edu (Eric Bergman-Terrell) Newsgroups: comp.windows.ms.programmer Subject: Re: casting near & far pointers Message-ID: <1991May23.134342.24419@mnemosyne.cs.du.edu> Date: 23 May 91 13:43:42 GMT References: <12902@sybase.sybase.com> Sender: usenet@mnemosyne.cs.du.edu (netnews admin account) Reply-To: ebergman@isis.UUCP (Eric Bergman-Terrell) Organization: Nyx, Public Access Unix (sponsored by U. of Denver Math/CS dept.) Lines: 13 Disclaimer1: Nyx is a public access Unix system run by the University of Disclaimer2: Denver for the Denver community. The University has neither Disclaimer3: control over nor responsibility for the opinions of users. A near pointer points to a location in the current segment. A far pointer can refer to an address in another segment. Consequently, if you cast a far pointer to a near pointer, the result will be bogus if the far pointer refered to a different segment. You can always go the other direction - you can cast near to far, near to huge, far to huge, etc. In fact, if you're using windows.h this is happening implicitly - look at the ansi prototypes for the windows api routines. And remember - segments are for worms! Terrell