This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Russ S.

By: a guest on Dec 28th, 2010  |  syntax: ColdFusion  |  size: 0.39 KB  |  views: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <cffunction name="applyFunction">
  2.         <cfargument name="function_name">
  3.         <cfargument name="value">
  4.        
  5.         <cfreturn arguments.function_name(arguments.value)>
  6. </cffunction>
  7.  
  8.  
  9. <cffunction name="double">
  10.         <cfargument name="input" type="numeric">
  11.        
  12.         <cfreturn arguments.input * 2>
  13. </cffunction>
  14.  
  15.  
  16. <cfset result = applyFunction(double, 3)>
  17.  
  18.  
  19. <cfoutput>
  20.         Double Result: #result#
  21. </cfoutput>
clone this paste RAW Paste Data