I'm sure someone has a rational explanation for this odd behavior??

If I run the following code it fails with a syntax error on the 
method call, but if I use the variable x or y, for example it works 
just fine as expected. Other vars that failed were a,b,c,d,f.
I didn't try any other than those..

Why is it that VFP doesn't like me using the variables of a, b, c, d, 
e, f ( perhaps others? ).

LOCAL e
e = CREATEOBJECT("myclass")
?e.hello()   <<-- Syntax error when compiling the PRG

DEFINE CLASS myclass AS Custom
FUNCTION hello()
         RETURN "hello"
ENDFUNC
ENDDEFINE

Changing the e variable to an x works as shown below:

LOCAL x
x = CREATEOBJECT("myclass")
?x.hello()   <<-- WORKS AS EXPECTED

DEFINE CLASS myclass AS Custom
FUNCTION hello()
         RETURN "hello"
ENDFUNC
ENDDEFINE


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to