Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Public var

1 view
Skip to first unread message

Thierry sombreffe

unread,
Aug 25, 2000, 3:00:00 AM8/25/00
to
Hi,

I have some trouble defining public variables....

I start my application with a PRG file called MAIN.PRG. In this file, I
declare my variables as PUBLIC and give it a value. Then, I start my form
with "DO FORM xxx" When I try to use my variable, it doesn't exist no more.
why?

thanks
Thierry Sombreffe

Reind Brackman

unread,
Aug 25, 2000, 3:00:00 AM8/25/00
to
Check if you use similar variable names in the form or issue Local with the
same name.
Reind
"Thierry sombreffe" <thierry....@cockerill-sambre.com> wrote in
message news:519A71327421D2118C2000805F65E04D0B4CD5A0@DUN-INT-NEWS01...

jim sturtz

unread,
Aug 26, 2000, 3:00:00 AM8/26/00
to
just by way of a suggestion (i have had more than 1 person tell me to QUIT
USING PUBLIC VARS) and altho i tend to believe easier is better (as long as
it doesnt confuse something), you can

do form xxx with 1,'q','susan',.t.

and in the init you could put an lparameter statement to grab the vars and
then do whatever you need to for the form.
--
jim
jst...@NetZero.Net
Thierry sombreffe wrote in message
<519A71327421D2118C2000805F65E04D0B4CD5A0@DUN-INT-NEWS01>...

William Steinford

unread,
Aug 26, 2000, 10:00:48 PM8/26/00
to
Also, check if you are passing your global var's as parameters... A
funny thing happens in Fox (VFP, whatever.. it still does it!) any
variable (including public) DISAPPEAR when they are used as a
parameter... that is, in the function you called you now have a new
name to refer to the variable by, you CAN'T use the old name.

-wgcs

On Fri, 25 Aug 2000 15:07:21 +0200, "Reind Brackman" <b...@euronet.nl>
wrote:

>Check if you use similar variable names in the form or issue Local with the
>same name.
>Reind
>"Thierry sombreffe" <thierry....@cockerill-sambre.com> wrote in
>message news:519A71327421D2118C2000805F65E04D0B4CD5A0@DUN-INT-NEWS01...

0 new messages