Your Options:
-make a custom tag
-make a UDF (user defined function) - see www.cflib.org for info
-if on CF MX make a function in a CFC (ColdFusion Component)
-go dead simple and make the script an included file and include it whereever you need it (set your "in" var(s) before including the file and the "out" gets set in the included file)

HTH

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
  ----- Original Message -----
  From: Daniel Kessler
  To: CF-Talk
  Sent: Friday, May 28, 2004 7:55 AM
  Subject: functions

  <

  I have a set of code in CF that I use four times in a script.  It
  could easily be a function with an in/out but I've yet to see
  functions in CF, mostly scripts.  I don't want to do anything special
  by making it external or making it nice enough to give to others.  I
  just want a callable/reusable function:

  function myFunction(some_passed_var){
  <cfset pv = some_passed_var>
  <cfset pv = pv+10>
  return pv
  }

  Is there something similar in CF?

  >

  --
  Daniel Kessler

  Department of Public and Community Health
  University of Maryland
  Suite 2387 Valley Drive
  College Park, MD  20742-2611
  301-405-2545 Phone
  www.phi.umd.edu
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to