i will only ever be going 2-3 levels deep at this stage. >I'm not sure how many levels of recursion your trying to do, but with CF >there is a limit to recursion. This little factorial function will show >you that limit in a hurry if you put in a large enough value. > ><cffunction name="factorial" access="public" returntype="numeric" >output="yes"> > <cfargument name="end_value" required="Yes" type="numeric"> > <cfif end_value lte 1> > <cfreturn 1> > <cfelse> > Calling myself with #arguments.end_value-1#<br> > <cfreturn end_value * Factorial(arguments.end_value-1)> > </cfif> ></cffunction> > > ><cfoutput>#factorial(1000)#</cfoutput> > > >Wil Genovese > >One man with courage makes a majority. >-Andrew Jackson > >A fine is a tax for doing wrong. A tax is a fine for doing well. > > > >Mike | NZSolutions Ltd wrote: >>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289065 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4