swarm-support
[Top][All Lists]
Advanced

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

Re: Selector of method returning 'float'


From: Wojtek Kopczuk
Subject: Re: Selector of method returning 'float'
Date: Fri, 14 Feb 1997 21:56:48 -0500

I read what I have sent a while ago and I promise not
to use word 'however' in the future. At least not in
each sentence :).
Wojtek

Wojtek Kopczuk wrote:

> Hi,
> I want to perform this kind of operation:
> 
> float f;
> f = [obj perform: method];
> 
> where 'method' is selector of the method returning
> float. However I am unable to compile it - method
> 'perform' is declared to return id. On the run-time
> however actually returned value is float. I wonder
> if there is some standard way to do this kind of thing.
> I found some solution, however it is a dirty one (and
> proves that C is powerful...). I do it in this way:
> 
> *((id*) &f) = [obj perform: method];
> 
> it works, however I don't feel too comfortable doing this
> kind of thing...
> 
> Wojtek

-- 
-----------------------------------------------------------
Wojtek Kopczuk              "There is no third way between
address@hidden       right and wrong"
IGS: wojtek                  Friedrich von Hayek 
http://www.econ.lsa.umich.edu/~wojtek
-----------------------------------------------------------


reply via email to

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