On Jun 1, 2008, at 7:19 PM, vince wrote:

I need to state whether a modulus value = zero.
For example:

if (textField.floatValue % 10 == (0)) {


What's wrong with my syntax?


You can't use % with floating point values. Instead, use fmod() on doubles (CGFloat on 64-bit) and fmodf() on singles (CGFloat on 32- bit). See the man page for details.

Nick Zitzmann
<http://www.chronosnet.com/>




_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to