ext_21159 ([identity profile] matt-arnold.livejournal.com) wrote in [personal profile] nemorathwald 2009-02-02 03:46 pm (UTC)

Thanks! Is there a bit of advice on programming style, concerning why 0 should come before the = and quantity comes after?

Is there a reason to avoid "if quantity != 1"?

However, both pieces of code expect a positive number and make no provision for negative numbers. Why is "0== quantity or 1 < quantity" more helpful?

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting