I'll repeat, in case the point was missed: if the concern here is that
structkeyexists doesn't do the job, note again that the arguments struct can
be treated as an array as well as a struct. And the arrayisdefined function
(new since 8) can test for the existence (or not) of an element in the
array-and there will be no element in the array for an argument which was
defined with cfargument but not passed in on the call (which was the concern
originally presented). Hope that helps someone.

/charlie

 

From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf
Of Dennis Clark
Sent: Friday, January 06, 2012 2:51 AM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] Count the number of arguments passed into a
function.

 

Unfortunately it's too late to strive for consistency at this point.

 

The odd behaviour of structKeyExists is due to the underlying Java
implementation, the inconsistent handling of null values in Adobe CFML, and
backwards compatibility concerns.

 

CF structs are special Java objects that implement the java.util.Map
interface. The method to retrieve a value in a Map is get(key). Map.get(key)
returns a Java null if the key does not exist in the map. However if the
<snip>

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to