On Jul 22, 2010, at 1:20 PM, Amy Gibbs wrote: > double *price, *uom, *cost;
You have declared pointers to double, a scalar type. "double" is _not_ an object type. > price = [Product valueForKey:@"UOMcost"]; > uom = [Product valueForKey:@"purchaseUOM"]; The above is wrong, and the compiler probably complained about it. -valueForKey: is not returning a double nor a pointer to a double. Most likely, in your case, it is returning a pointer to an NSNumber object. You can ask an NSNumber for a double value (which, again, will not be a pointer to a double). > cost = uom/price; > although the actual calculation won't work, not sure why, example values are > price=8.8, uom=25, getting an error:invalid operands to binary? That's because you are attempting to divide two pointers. That doesn't make sense. Regards, Ken _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com