swarm-support
[Top][All Lists]
Advanced

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

Re: Arrays as arguments ?


From: Nasty Ace
Subject: Re: Arrays as arguments ?
Date: Tue, 1 Jul 1997 12:36:55 -0400 (EDT)

> I have an object which has an instance variable defined thus:
> 
> short int myArr [MAX1] [MAX2];
> 
> Given the limitations placed by ObjectiveC on the types of arguments that
> can be passed via messages, what is the best way to :
> 
> a) pass an array like myArr as an argument to a message,
> b) pass such an array back as the return value of a message ?
> 
I actually had a similar problem.  And fortunately (as it turns out) I 
needed it to be a dynamic 2d array as well.  And what I did is I created a 
pointer-based dynamic 2d array object.  That worked for me.

As far as your question is concerned, perhaps creating an object might be 
the way to go.  

If there are better ways of doing it, I'd love to hear it.  Thanx in advance.

------------------------------------------------------------------------------
| casey tan                                                                  |
------------------------------------------------------------------------------
| e-mail        : address@hidden                                     |
| telephone     : (215) 387-3492                                             |
| snail mail    : 20 South 39th Street, Apt N4, Philadelphia, PA 19104       |
| url           : http://www.seas.upenn.edu/~tankh                           |
------------------------------------------------------------------------------

        "Colour me any colour.
         Speak to me in tongues and share.
         Tell me how you'd love to hate me.
         Tell me how you'd love to care. 
         Well I just want to shake us up."

                                                "Gel"
                                                by Collective Soul






                  ==================================
   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.
                  ==================================


reply via email to

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