Scope of a Local variable in a cfm page?
问题 The following is on a test.cfm page: <cfscript> Local.myString = "Hello"; </cfscript> What is the scope of myString ? Will it be visible in other parts of the cfm page or just between the <cfscript> tags where it was defined? 回答1: Outside of a function, that assigment sets a variable variables.local.myString , and the scoping rules of the variables scope are well documented: About scopes: variables. From the docs: The default scope for variables of any type that are created with the cfset and