[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 | |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Re: "zone" or "getZone"? and one additiona question., (continued)
- Thanks all & -updateLattice Method, Jae Chan Oh, 1997/03/17
- Casting an id type to a specific object type?, Jae Chan Oh, 1997/03/14
- Re: Casting an id type to a specific object type?, Ken Cline, 1997/03/14
- Re: Casting an id type to a specific object type?, Jae Chan Oh, 1997/03/15
- Re: Casting an id type to a specific object type?, Ken Cline, 1997/03/15
- Re: Casting an id type to a specific object type?, mcmullin, 1997/03/17
- Re: Casting an id type to a specific object type?,
mcmullin <=