Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can function argument have hint in cfscript (CF9)?

Can function argument have hint in cfscript (CF9)?

CFML style:

<cffunction name="myFunc" output="false" returntype="void">
  <cfargument name="arg1" type="arg1" default="default" hint="my hint">
  ...
</cffunction>

CF9 cfscript style:

public void function myFunc(string arg1='default') {
  ...
}

Where to specify hint of the argument (arg1) above?

like image 945
Henry Avatar asked Aug 26 '09 01:08

Henry


1 Answers

The easiest way is to to use JavaDoc notation.

component{

/**
* @hint This is a hint
* @arg1 This is an argument hint
* @arg2 This is another argument hint 
*/
public void function myFunc(string arg1='default', numeric arg2) {
  return TRUE;
}

}

like image 154
Terry Ryan Avatar answered Oct 29 '22 23:10

Terry Ryan