Creates a parameter definition within a component definition. Defines a function argument. Used within a cffunction tag.
<cfargument name="">
myFunction(required any myArgument){}
any
array
binary
boolean
component
date
email
function
float
guid
integer
numeric
query
string
struct
uuid
xml
variablename
(component name)
no
true
false
For Script syntax the argument is inside the ()
public boolean function myFunction(required any myArgument) {
// Some function bits
return true;
}
For Tag syntax the argument is its own tag
<cffunction access="public" returntype="boolean" name="myFunction">
<cfargument required="true" type="any" name="myArgument">
<!--- Some function bits --->
<cfreturn true>
</cffunction>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.