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]
______________________________________________________________________
Why Share?
Dedicated Win 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=coldfusionc
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