But I get a compile-time error of "pointer value used where a float was expected." What can I do?
A: The perform method is prototyped to return a value of type id. While the C compiler lets you cast of lot of things, it says enough is enough when you try cast something of type id to be float. Here is one workaround which allows you to get the value you want: