Woah woah woah. I want to be sure we are -very- clear here. Peter, you said,

"With CF9 you don't need the var keyword anymore, and if you don't
need backwards compatible code it's (arguably) clearer to not use it
at all."

That is not true. You do need to var scope. What you don't need to do
is use var statements to work with the var scope. You can use the
local scope instead. So to be clear, these two options are ok.

<cfset var x = 1>
<cfset local.x = 1>


On Wed, Aug 3, 2011 at 1:37 PM, Gerald Weir
<[email protected]> wrote:
>
> Peter, great examples, really helpful.
>
> In a nutshell, if I get it, in CF9 you do not need to use:
>
> <cfset var local = StructNew() />
>
> because you are going to define your vars as:  local.myVar1 and local.myVar2 
> and the local structure is already defined by default.
>
> You refer to your vars throughout the cffunction as local.myVarXXXX.
>
> Hope that's right,
> Jerry
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346513
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to