swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Casting an id type to a specific object type?


From: mcmullin
Subject: Re: Casting an id type to a specific object type?
Date: Mon, 17 Mar 1997 10:15:07 -0700 (MST)

[ooops...]

On 17 Mar, I wrote:
[...] 
> I suggest you insert a :
> 
>   printf("%x\n", (int *)(*tgt));

That'll teach me for making this up on the fly: the
cast here is in the wrong place, and should read,
instead:

  printf("%x\n", *(int *)(tgt));

In GDB, the appropriate print command would be
something like:

 p /x *(int *)(tgt)

or, possibly,

 p /x *(int *)(self->tgt)

if tgt is an instance variable.


Sorry for the additional confusion!

- Barry.

> 
> -- 
> 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> | Barry McMullin, ALife Group,               |    address@hidden |
> | Santa Fe Institute, 1399 Hyde Park Road,   |  Voice: +1-505-984-8800 |
> | Santa Fe, NM 87501, USA.                   |  FAX:   +1-505-982-0565 |
> | http://www.eeng.dcu.ie/~mcmullin           |                         |
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> 

-- 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Barry McMullin, ALife Group,               |    address@hidden |
| Santa Fe Institute, 1399 Hyde Park Road,   |  Voice: +1-505-984-8800 |
| Santa Fe, NM 87501, USA.                   |  FAX:   +1-505-982-0565 |
| http://www.eeng.dcu.ie/~mcmullin           |                         |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




reply via email to

[Prev in Thread] Current Thread [Next in Thread]