Why shouldn't you need to scope?  I think you should always scope - even
variable.







"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: Denny Valliant
To: CF-Talk
Sent: Sat Aug 26 03:37:28 2006
Subject: Re: How would I code this line?

On 8/25/06, Bobby Hartsfield <[EMAIL PROTECTED]> wrote:
>
> <cfset name = first_name & " " middle_name & " " & last_name />
> <cfif len(trim(suffix)>
>     <cfset name = name & ", " & suffix />
> </cfif>


Sure that LOOKS readable, but you know CF will be running around
trying to figure out which "first_name" field you're referring to.

Or you could find out which scopes CF checks first, I guess, but that's
not as nifty.  Sorta relying on the drum spinning round 'stead of the
program, sota speak.  Hmmm maybe nifty-er, from perspective B. =]

(personal gripe: I 90% don't use variables.somevar notation, mostly
cus it's freaking hard to read the code when every var is scoped.)

Or that might just be some old info, and scoping isn't so "in" now?

Staying hungry, yeah, that's it. ;-)  Guess I shoulda read that last
post about how the vars are passed around in CF more carefuller,
neh? Goes in one ear.. right out the other. I swear!

Seriously, scoping vars kind of bugs me. Shouldn't have to do it all
the time for a Best Practice- or else make the scope names shorter. ;-P

/end of denopinion ranthology & with apologies about clarity, lackthereof.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251121
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to