More likely at some point they will change the documentation to match the way cfreturn actually works, which, afaik is common to other programming languages like C/C++, Java and even JavaScript as well. The return statement (in this case a tag) terminates execution of the function (much like cfexit terminates execution of a tag), so while it's possible to have multiple instances of the return statement in your function, unless they're occluded by conditional logic (if-else,switch-case, etc) none of the rest of the function after the first return statement will be executed during a function call. By using conditional logic it's possible to have a function that may return data early in order to avoid gratuitous code (using a caching mechanism for instance), or return some default value when the function might otherwise produce an error.
hth Isaac Original Message ----------------------- CFRETURN's documentation says that a maximum of one CFRETURN is allowed per function. But I have code that does multiple CFRETURNs and it works just fine. Let's not argue whether that's a good programming practice, but do you think Macromedia will ever change ColdFusion to disallow multiple CFRETURNs so that it agrees with the documentation? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

