Encapsulation
Class CLASS To define a class of CLASS must inherit to a class, before VFP8, it is generally inherited to Custom, but this class is still too cumbersome, there are too many useless methods and properties. In VFP8, a new class EMPYT is added, which is the LDM in the VFP. Define Class Screen As EmptyEnddefine
Properties VFP is a weak type of language, to define properties, must be assigned to an attribute. Define Class
Screen
AS
CustomcurrentMovie = "The Sound of Music" Availableseats = 150DATE = {
06/20/98
Enddefine
Method definition method can use function or procedure, which is Funciton to return a value, and Procedure cannot. Similar to Delphi.
Reference:
"Advanced Object Oriented Programming with Visual FoxPro 6.0"