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

Public Declaration of programs with VFP9

Status
Not open for further replies.

TerryUrb

Programmer
Oct 3, 2005
40
CA
I have one program called "Serial.prg" and within this file I have made PUBLIC several small connected routines of which share some routines within themselves. VPF does not seem to recoginze this public statement. Do I have to break the code apart and make several program files to solve this problem or is there another declaration which will help VFP locate these routines?

Ie
File is "Serial.prg"
Public PrepData,SendData,StoreData,RecData

If I change the file to PrepData, VFP will then run the program, but I would like be able to call any of the routines.

Thanks
Terry
 
Use the command:

set procedure to serial.prg

or

set procedure to serial.prg additive (if you need to open more than 1 procedure file)

The public statement is not required.


 
Public PrepData,SendData,StoreData,RecData
does declare public variables.

F1 is the key.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top