Almost all areas except 'THIS' are available on CFM pages.
variables without a space declared on the CFM page can be called directly or can be called with the VARIABLES area prefix.
eg:
<cfset varA = 'someValue'/>
can also be written as
<cfset VARIABLES.varA = 'something' />
To my knowledge, if you do not create a singleton (CFC only) and place it in the application area, you never run the risk of sharing variables with other users. This is also true if you are not careful in correctly defining local variables in CFC functions.
On the CFM page, each user request has its own processing flow and never intersects with another user request. Thus, the variables are tied only to the scope of this particular request.
if you want the variables to be used by all users requesting the page, you can put them in the APPLICATION area.
I did not quite understand your second question. if you can clarify, maybe I can add more to my answer.
Update
This code will help you answer 2 questions.
<cfscript> function a(){ _a = 20; WriteOutput("Inside function:"&variables['_a']); WriteOutput("Inside function:"&variables['_b']); } _b = 30; a(); WriteOutput('outside function:'&variables['_a']); </cfscript>
Exit
Internal function: 20
Internal function: 30
external function: 20
Sanjeev
source share