Re: Variable name oddity?

Author: Lew

Posted: 2011-02-22 at 14:15:07

"e" is a valid workarea name.

Lew

-----Original Message-----

From: Steve Ellenoff <sellenoff@pinmame.com>

Sender: profoxtech-bounces@leafe.com

Date: Tue, 22 Feb 2011 14:12:03

To: <profoxtech@leafe.com>

Reply-To: profox@leafe.com

Subject: Variable name oddity?

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: ProFox@leafe.com

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/442491.97828.qm@smtp125.sbc.mail.sp1.yahoo.com

** 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.

Report [OT] Abuse: http://leafe.com/reportAbuse/442491.97828.qm@smtp125.sbc.mail.sp1.yahoo.com

_______________________________________________

Post Messages to: ProFox@leafe.com

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/1897554021-1298402108-cardhu_decombobulator_blackberry.rim.net-1240047944-@bda360.bisx.prod.on.blackberry

** 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.

©2011 Lew