On 4/27/05, COLLIE David <[EMAIL PROTECTED]> wrote: > Whilst I agree with you about implicitly coercing the numeric result, > I'm sure I've heard Mr Cofield (or rathter certain guidelines) advocate > that very method in coding guidelines... Are the ones I got out of date > of have I got my memories completely mixed up?
You're mixed up - the guidelines specifically say not to do that: http://livedocs.macromedia.com/wtg/public/coding_standards/goodpractice.html "...don't rely on implicit conversions from numeric types to boolean. Functions like compareNoCase() and listFind() should be explicitly tested against zero for clarity instead of relying on the "0 is false" conversion:" I never advocated it in C or C++ either during my years of writing guidelines for those languages. Relying on the implicit conversion is lazy and error prone (since many people accidentally invert the condition - either while they're writing the code or, worse, when they're reading other people's code). -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? -- I have 50, yes 50, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204786 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

