You can do even more with <cfparam>, i. e. specify a variable type (integer,
boolean and so on). So the tag is internally more than a simple isDefined()
function.

Bye
Rene Guenther

----- Original Message -----
From: "Brunelle, John" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 5:46 PM
Subject: <cfparam> vs isDefined()


> Just curious if anybody has looked at the difference between
> using the <cfparam> tag and using the isDefined() function.
>
> For instance: in the Application.cfm or the app_global.cfm file.
> If I have a global variable that I would like to prevent from setting
> and resetting everytime the file is executed. Would I be better off using
> <cfparam> or isDefined().
>
> example:
>
> global variable: client.example
>
> <cfparam name="client.example" default="am i faster">
>
> OR
>
> <cfif not isDefined("client.example")>
>    <cfset client.example = "or am i faster">
> </cfif>
>
>
> My thought here is that internally the <cfparam> tag
> is really a kind of isDefined() function. Yet, being
> that this will execute for every single page catches
> my curiousity.
>
> Any thoughts?????
>
> Thanks,
>
> John Brunelle
> FMHI Web Programmer
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to