defining and using globals in an application

Mark Wieder mwieder at ahsoftware.net
Thu Jul 7 20:52:05 EDT 2011


Bob-

Thursday, July 7, 2011, 9:11:51 AM, you wrote:

> I don't think it's a bug IMHO. How can a variable in the same
> script have 2 scopes? How would the app know which you were talking
> about when you used it? 

Well, see, that's where I think it's a bug. If there's a global xyzzy
in memory I don't think the compiler should let me use a local xyzzy,
no matter whether I declare the global in the script or not. If you
have a global variable in a script and you try to redeclare it as a
local variable the compiler won't let you do that.

Using the same name for both is a bad idea in the first place, whether
or not you can get away with it.

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the use-livecode mailing list