There's a function that mimics CFPARAM here, if that helps. http://www.cflib.org/udf.cfm?ID=144
______________________ steve oliver cresco technologies, inc. http://www.crescotech.com -----Original Message----- From: Tyler Silcox [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 6:24 PM To: CF-Talk Subject: optional UDF parameters??? Is it possible to make a parameter optional in UDFs, just like some of CF's built in functions? Here's what I got's: <cfscript> /* i might only want to pass the 1st parameter and i have no need to pass the 2nd parameter everytime so i'd like to leave it off and not code in an empty ("") everytime */ function myFunction(Parameter1,Parameter2){ someVariable=""; etc... } </cfscript> If I leave the function like above and then only pass one argument: #myFunction("Bah")# , I get the following error: The number of arguments passed to a user-defined function cannot be less than the number of parameters in its definition. This call to myFunction passes 1 arguments, but 2 parameters are defined. I know CF can do it, but can I? Tyler Silcox email | [EMAIL PROTECTED] ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

