Is there anyway to determine the Scope [Public, Private or Local] of a
Variable.

Using Foxpro 8.0 Pro.

Re: Checking the Scope of Variable ? by Paul

Paul
Wed Jun 29 03:28:06 CDT 2005

Not that I know of. But if you declared it LOCAL in the current procedure,
then it's local (of course). If you didn't, then it's either PUBLIC or
PRIVATE, but which of those two it is will matter only rarely, and not to
the current proc at all.


"Tanveer H. Malik" <tanmalik@hotmail.com> wrote in message
news:eMZlJyHfFHA.1948@TK2MSFTNGP12.phx.gbl...
> Is there anyway to determine the Scope [Public, Private or Local] of a
> Variable.
>
> Using Foxpro 8.0 Pro.
>
>



Re: Checking the Scope of Variable ? by Bernhard

Bernhard
Wed Jun 29 04:19:41 CDT 2005

Hi Tanveer

> Is there anyway to determine the Scope [Public, Private or Local] of a
> Variable.
>
> Using Foxpro 8.0 Pro.

I think the best way is to have a good naming convention. Then very often the
first letter of your variable name shows the scope.

Regards
Bernhard Sander

Re: Checking the Scope of Variable ? by Robert

Robert
Wed Jun 29 12:27:42 CDT 2005

One can try the "DISPLAY MEMORY LIKE VarSkeleton TO FILE FileName [ADDITIVE]
NOCONSOLE" command, and analyze the FileName content for the scope of
VarSkeleton.

The FileName content will have either (hid), Pub, Priv, or Local as the
scope for the variable(s) and array(s) that match the skeleton pattern
VarSkeleton.

--
Robert Hoogstraat


"Tanveer H. Malik" <tanmalik@hotmail.com> wrote in message
news:eMZlJyHfFHA.1948@TK2MSFTNGP12.phx.gbl...
> Is there anyway to determine the Scope [Public, Private or Local] of a
> Variable.
>
> Using Foxpro 8.0 Pro.
>
>