swarm-support
[Top][All Lists]
Advanced

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

Re: List: forEach: arg1;


From: glen e. p. ropella
Subject: Re: List: forEach: arg1;
Date: Wed, 5 Mar 1997 07:45:02 -0700

Ooops!  It seems Kevin answered this more thoroughly than
I did.  Use his fix!

But, now that I've looked closely at it:

           (*((id*)(&f)))

Couldn't you simply have your method take a pointer
to a double instead of a double (which is easy enough
to use in most contexts)?  That would cut this construct
down to:

   double myarg;

   [..]

   [metabList forEach: M(addConcentration:) : (id)(&myarg)];

   [...]


Then in the Metabolite object, you could define the addConcentration
as

   -addConcentration: (double *) c;

There shouldn't be any problems casting a pointer to a double
to a pointer to an object, should there?

glen


reply via email to

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