Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 6 to VFP 9 conversion problem

Status
Not open for further replies.

bicyleman9008

IS-IT--Management
May 19, 2005
30
A piece of code that we have in our VFP 5 & 6 (works fine) build reads:

form A
public dime allheaders[45,3]
do form B

form B
external array allheaders

generates and error when we try to build it in VFP 9
"unknown allheaders - undefined"

Can anyone help?

Glenn

 
Instead of public dime allheaders[45,3]

try public array allheaders[45,3]

Steve
 
This doesn't solve your problem, but why even use PUBLIC variables? They are considered bad because they break encapsulation. Surely there is another way.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
We will just rewrite this section differently.
There is always a different way.

Thanks.
 
Actually ....
public array DOES work.

Thanks SGLong.

Regarding the use of public variables...this code snippet was a carry over from a DOS upgrade. The DOS version was written in 1988. Up until now it has been fine.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top