Really, the crux of it is that functions specify what they're going to return. Since sometimes functions don't need to return anything, there has to be a way of specifying that, so you use "void". Note that omitting the RETURNTYPE attribute doesn't mean "i return nothing", it means "I may or may not return something, and I'm not telling you what it may or may not be", so you should always specify a return type on you functions.
To answer your specific questions, if you try and return something, an error will be thrown. You can still use the CFRETURN tag to exit the function at a place other than the end, you just can't return a value. cheers, barneyb On 6/26/05, Mike Kear <[EMAIL PROTECTED]> wrote: > I understand that a CFC method with returntype="void" isnt going to > send anything back, but what specifically does returntype="void" > mean? > > For example, does it mean that even if the function tries to return a > value it's not going to? or if it tries to return a value it'll throw > an error? Why have this value at all? If there's no <cfreturn tag > in the method, there will be no value returned, so what does this do? > > It's not all that important I guess because it works, but I'm just > curious as to what this does. I've learned in the past that whenever > it looks like something is doing nothing, its usually because there's > something going on in the background that I haven't noticed yet. > > Cheers > Mike Kear > Windsor, NSW, Australia > Certified Advanced ColdFusion Developer > AFP Webworks > http://afpwebworks.com > ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210568 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

