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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foxpro 2.0 on w2k and bad programming

Status
Not open for further replies.

JairRunfesco

Programmer
Sep 28, 2005
3
AR
Hi!

I'm brand new in TekTips -and fighting with my english!- so please be patient with me.

I've to mantain and old app written for foxpro 2.0 (for DOS), actually working on windows 2000 pro. The app works fine, but when modifying some lines, it "forgets" some variables, and loss data. It seems to be lack of memory, 'cos the error happen with a variable added. But when removing the variable, works pretty fine.
It doesn't show any error message, but neither save on the dbf all the fields it should.
Perhaps can save some memory using constants instead of many variables. how do i define a constant in foxpro?
(don't have help o manuals, sorry)

 
The command to define a constant is:
Code:
#DEFINE MY_CONSTANT 42
#DEFINE MY_STRING   'Hello world'

Note that there is no equals sign and you don't declare the type of the variable.

Are you sure you don't have help? Remember that you're working with a program that's 15 years old and you won't find a "hlp" or "chm" file. Help is in "FoxHelp.Dbf". Try typing the word help.

Geoff Franklin
 
It sounds like mayber there is a scoping problem.
If you declare a memory variable in one portion of the application, a program or procedure above that procedure in the call stack may not see that variable.
You need to declare that variable prior to calling the next procedure.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top