RE: Writing Custom Functions

2001-05-31 Thread Robert Everland III
What would be the scope of a UDF then? say udf.foo or function.foo? Bob Everland -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 30, 2001 3:05 PM To: CF-Talk Subject: RE: Writing Custom Functions Maybe I'm reading this wrong, but I have

Re: Writing Custom Functions

2001-05-31 Thread Michael Dinowitz
To: CF-Talk Subject: RE: Writing Custom Functions Maybe I'm reading this wrong, but I have to ask - does this mean that one can, with CF5, set the code of a UDF into a variable, and then execute that UDF just by calling that variable in function syntax, and it automatically gets

Re: Writing Custom Functions

2001-05-31 Thread Avi Flax
As long as we're talking about variable scopes, is there a structure that I can get access to that contains all local variables? That is, variables that are in the variables scope. I have a debug routine at the bottom of all my pages that displays all application,session,form,url,request,cgi

Re: Writing Custom Functions

2001-05-31 Thread Don Vawter
I am with ya. I have wanted that for a long time. - Original Message - From: Avi Flax [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, May 31, 2001 8:47 PM Subject: Re: Writing Custom Functions As long as we're talking about variable scopes, is there a structure that I

Re: Writing Custom Functions

2001-05-30 Thread Avi Flax
Michael, Maybe I'm reading this wrong, but I have to ask - does this mean that one can, with CF5, set the code of a UDF into a variable, and then execute that UDF just by calling that variable in function syntax, and it automatically gets evaluated and run? Is that all the function keyword

Re: Writing Custom Functions

2001-05-30 Thread Michael Dinowitz
Your reading me correctly. A UDF is a 'system symbol' like any variable, object reference, etc. This means it shows up in an IsDefined() call and even has its own function (IsCustomFunction()). The example below shows a simple UDF and it's aliases. One of which is a server variable. CFSCRIPT

RE: Writing Custom Functions

2001-05-30 Thread Raymond Camden
Maybe I'm reading this wrong, but I have to ask - does this mean that one can, with CF5, set the code of a UDF into a variable, and then execute that UDF just by calling that variable in function syntax, and it automatically gets evaluated and run? Yes. Consider this: CFSCRIPT

RE: Writing Custom Functions

2001-05-25 Thread Kola Oyedeji
PROTECTED]] Sent: 25 May 2001 00:57 To: CF-Talk Subject: Re: Writing Custom Functions Sounds good! Who am I to argue with Ben Forta and Micheal Dinowitz!?!? Looking forward to the UDF's at any rate... thanks for the info! Steve ~~ Structure your ColdFusion

Re: Writing Custom Functions

2001-05-25 Thread Michael Dinowitz
can you do inside UDFs? Thanks KOla -Original Message- From: Steve Reich [mailto:[EMAIL PROTECTED]] Sent: 25 May 2001 00:57 To: CF-Talk Subject: Re: Writing Custom Functions Sounds good! Who am I to argue with Ben Forta and Micheal Dinowitz!?!? Looking forward to the UDF's

Re: Writing Custom Functions

2001-05-24 Thread Michael Dinowitz
* Team Allaire * In CF 5 the answer is yes. CFSCRIPT function StringLimit(string, length) { if (len(string) GT 8) return Left(lname, 8); else return string; } /CFSCRIPT I already know the answer to this, but I

RE: Writing Custom Functions

2001-05-24 Thread Raymond Camden
This is possible in ColdFusion 5 which will be released soon. For an set of examples on UDF, see www.cflib.org. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email : [EMAIL PROTECTED] ICQ UIN :

Re: Writing Custom Functions

2001-05-24 Thread David E. Crawford
CF 5 will provide this capability. - Original Message - From: Steve Reich [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, May 24, 2001 14:48 Subject: Writing Custom Functions I already know the answer to this, but I thought I would see what it might inspire Is

Re: Writing Custom Functions

2001-05-24 Thread Pooh Bear
you can write a custom fuction in CF 5.0, just as if u were using javascript or whatever. From: Steve Reich [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Writing Custom Functions Date: Thu, 24 May 2001 14:48:11 -0400 I already know the answer to this,

RE: Writing Custom Functions

2001-05-24 Thread Matthew Fusfield
User-defined functions (UDFs) will be available in ColdFusion 5.0, which should be released in the near future. The syntax will not allow you to call tags from within the custom function, only cfscript elements and functions. For example: cfscript function StringLimit(thestring,length) {

Re: Writing Custom Functions

2001-05-24 Thread Steve Reich
Awesome! Thanks Michael...! Will those user defined functions be included in a global functions page or how are they accessed? Say you have 50 user defined functions you wouldn't want to include them all, right? Steve Reich Michael Dinowitz [EMAIL PROTECTED] wrote in message

Re: Writing Custom Functions

2001-05-24 Thread Michael Dinowitz
* Team Allaire * The normal operation is to have your UDF either on the same page as you need them or in a CFINCLUDE. If your especially evil then you can load them into server or application variables in an initialization page and then use

RE: Writing Custom Functions

2001-05-24 Thread Russel Madere
. -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 15:48 To: CF-Talk Subject: Re: Writing Custom Functions * Team Allaire * The normal

Re: Writing Custom Functions

2001-05-24 Thread Steve Reich
The normal operation is to have your UDF either on the same page as you need them or in a CFINCLUDE. If your especially evil then you can load them into server or application variables in an initialization page and then use them as server.stringlimit('this is my string', 5). Using them in

Re: Writing Custom Functions

2001-05-24 Thread Michael Dinowitz
* Team Allaire * Why kill all the cool speed increase you get from a UDF by putting it in a custom tag? A 'header library' is acceptable in most languages so putting CFINCLUDE template=/cfide/library/libdebug.cfm in the application.cfm is

RE: Writing Custom Functions

2001-05-24 Thread Ben Forta
the ones you want. Kind of like including header file in C. --- Ben -Original Message- From: Steve Reich [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 6:08 PM To: CF-Talk Subject: Re: Writing Custom Functions The normal operation is to have your UDF either on the same page

Re: Writing Custom Functions

2001-05-24 Thread Jim McAtee
What about putting them in a custom tag and then just calling the UDF's you need? You could have all of your UDF's in a single file and call them as you need them cf_UDF GetFunctions=StringLimit, IntegerCount, MyGrandmasFavoriteCookieRecipe, OneMoreFunction That way, you could

Re: Writing Custom Functions

2001-05-24 Thread Steve Reich
Sounds good! Who am I to argue with Ben Forta and Micheal Dinowitz!?!? Looking forward to the UDF's at any rate... thanks for the info! Steve ~~ Structure your ColdFusion code with Fusebox. Get the official book at