Actually I believe that the default in JS is to assume all vars declared within a function are function-local... if you want a variables to persist beyond the function execution, it'll have to be declared outside a function...

Although the var keyword comes to mind for JS, too...

I'd have to look it up.

J

On Apr 4, 2005 11:24 PM, Dave Watts <[EMAIL PROTECTED]> wrote:
> Understood, but what's odd is that vars declared inside a
> function escape to the outside at all, regardless of whether
> it's a UDF or component method. I haven't seen that in other
> languages. Is it common?

I believe that's the default behavior in _javascript_ as well.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]




--
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://www.web-relevant.com/blogs/cfobjective ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to