Creates a parameter definition within a component definition. Defines a function argument. Used within a cffunction tag.
<cfargument name="">
myFunction(required any myArgument){}
anyarraybinarybooleancomponentdateemailfunctionfloatguidintegernumericquerystringstructuuidxmlvariablename(component name)notruefalseFor 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.