[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Return pointer to array: not possible?
From: |
Eric Werk |
Subject: |
Re: Return pointer to array: not possible? |
Date: |
Thu, 01 Apr 1999 19:07:08 +0200 |
Paul E. Johnson wrote:
>
> id attribute[10];
> How can I return that when another agent wants the attribute vector?
I would think you could just do this:
- (id *) getArray
{
return attribute;
}
Use:
id *attr;
attr = [otherObject getArray];
This returns a pointer to the array (in C, arrays and pinters are the
same thing - messy, but efficient) But beware: this is exactly the same
thing that the original object has, so changes via the new array will
also change the original array!
/Eric Werk
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- Return pointer to array: not possible?, Paul E. Johnson, 1999/04/01
- Re: Return pointer to array: not possible?,
Eric Werk <=
- Re: Return pointer to array: not possible?, Axel von Kamp, 1999/04/01
- Re: Return pointer to array: not possible?, Marcus G. Daniels, 1999/04/01
- optimization and C arrays (was Re: Return pointer to array: not possible?), Theodore C. Belding, 1999/04/01
- Re: Re: Return pointer to array: not possible, Eric Werk, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: not possible?), Marcus G. Daniels, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Paul E. Johnson, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Marcus G. Daniels, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Theodore C. Belding, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Sven N. Thommesen, 1999/04/01
- Re: optimization and C arrays (was Re: Return pointer to array: notpossible?), Marcus G. Daniels, 1999/04/01