Heh good tip steve.
Didn't think you could do that, hmm.....
Not too shabbbbby...indeed.
Scott
Steve Onnis wrote:
Well sort of
you cant do for example
function session.myFunc () { }
that will error
if you want to do that you would have to do
function myFunc () { } session.myFunc = myFunc
Steve
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ben Smith Sent: Wednesday, August 18, 2004 2:06 PM To: CFAussie Mailing List Subject: [cfaussie] Re: user defined functions
Functions can also be made available to different scopes just like a variable, according to macromedia. My personal preference is to just group them together logically into include files and include them in pages as needed.
On Wed, 18 Aug 2004 13:42:34 +1000, Mark Stanton <[EMAIL PROTECTED]> wrote:
Yes thats exactly right.
The function itself can be coded in the format:
<cfscript> function FormatMRN(inStr) { ...code here... return outStr } </cfscript>
OR
<cffunction name="FormatMRN" ...> <cfargument name="inStr" ...> ...code here... <cfreturn outStr> </cffunction>
This code can either be placed in the current file (not very good for reuse) or included from an external file.
Cheers
Mark -- Mark Stanton Gruden Pty Ltd http://www.gruden.com
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
