Path: utzoo!utgpu!watserv1!watmath!att!att!pacbell.com!ucsd!usc!samsung!munnari.oz.au!bruce!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Pointers and addresses Message-ID: <4139@goanna.cs.rmit.oz.au> Date: 30 Oct 90 02:00:12 GMT References: <15831@mentor.cc.purdue.edu> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 28 In article <15831@mentor.cc.purdue.edu>, shepherd@mentor.cc.purdue.edu (Mike Shepherd) writes: > Is there a way to change an integer into an address location, vice versa, an > address location into an integer? What on earth is an address location? Do you mean a pointer? How about an example of what you want to do? Bear in mind that pointers and integers are different sizes on some machines (e.g. Primes with 32-bit integers and 48-bit pointers, PCs with 16-bit "int" and 32-bit "far pointer") and that even on machines where they are the same size not all integers correspond to valid addresses (e.g. 370/XA). You really do need to tell us what you are trying to do before we can give you advice worth having. > I keep getting illegal indirection & illegal pointer/integer comb errors. > Is this possible? If it happens, it's possible. Why don't you show us a _small_ example of the code you're trying to write and what goes wrong with it, so that we can help? (I thought Purdue was supposed to be one of the really good places for Comp Sci. Surely there must be _someone_ there who can give you face- to-face help? That's bound to be better than the Net.) -- The problem about real life is that moving one's knight to QB3 may always be replied to with a lob across the net. --Alasdair Macintyre.