I'm trying to move the contents of my Application.cfm and OnRequestEnd.cfm to a
new Application.cfc. Everything works, except for the UDF's. I need to have
them called on most every page, so I put them in the onRequestStart function
like so:

I end up with this error:
Invalid CFML construct found on line 167 at column 35.
The function GetScale is illegally nested inside of another function
definition onRequestStart, which is located at line 166, column 27.

If I put it outside all the other functions, it won't get called. Where am I
supposed to put the UDF's?


<cffunction name="onRequestStart">
<cffunction name="GetScale" returntype="numeric">
<cfargument name="val" required="yes" type="numeric" default="">
function GetScale(val) {
// function calls here
}
</cffunction>
</cffunction>