<cfif not isdefined("var.foo")> ? I use <cfif myquery.recordcount> Returned at least one record <cfelse> Naddah! </cfif>
It is a elegant way to test for the existance of something. User with CFPARAM if you at least require a default of some sort. On 04/06/07, grant <[EMAIL PROTECTED]> wrote: > Hi All > > My patchy memory keeps nagging at me not to use isDefined(). > Am I off-base or do I remember something about it being best-practice to > avoid isDefined()? > > Who's got the low-down? > Grant > > > > -- Peter Tilbrook ColdGen Internet Solutions President, ACT and Region ColdFusion Users Group PO Box 2247 Queanbeyan, NSW, 2620 AUSTRALIA http://www.coldgen.com/ http://www.actcfug.com/ Tel: +61-2-6284-2727 Mob: +61-0432-897-437 Email: [EMAIL PROTECTED] MSN Messenger Live: Desktop General --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---