How to Declare Argument’s Attributes in cfscript Function

All persons are familiar with cfscript function would like to know how to define parameters qualifiers in cfscript function.
It is just FYI on how to define arguments qualifiers i.e. default value of parameter, It’s datatype, Required Or Not. I hope you may find it interesting.

Syntax
[code:cf]
public function fun_name(required string argument1 = ”){}
[/code]

Generally, Using <cfargument /> tag we may declare something like this.
[code:cf]
<cfargument name="arg1" default="123" required="true" type="numeric">
[/code]

CfScript Equivalent:
[code:cf]
public function scriptFunction(required numeric arg1 = 123){
…..
}
[/code]

You need to take care about sequence of argument. It will take default required = ‘false’. Click here to know more…