The <cfargument> tag is not *supposed* to create the argument (with an unusable default value): that's the problem.
If you stick with the proper way to test if the argument was passed, you'll get the expected behavior:
<cfif structKeyExists(arguments,"arg")>
... so something with arguments.arg ...
</cfif>Being able to use arguments as either a struct or an array is the exception to the way most languages handle things. Besides, if you use:
isDefined("arguments[1]")
or
isDefined("arguments.arg")you'll also see that it is undefined.
<cfargument> is for defining what an argument might be. IF it's passed.
And if you *want* to give it a default, the mechanism is there. CF
should not be setting a default automatically.
It isn't. NULL is a non-value - CF is not setting a value. A variable with a NULL value is treated as undefined by CF. See also my response to Ben...
Sean A Corfield -- http://www.corfield.org/blog/
"I have always wished that my computer would be as easy to use as my telephone. My wish has come true - I no longer know how to use my telephone."
-- Bjarne Stroustrup
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
