???????? ?? ?????????????? ?? ???? ? ??????????????????, ?????? ?????, ????????????, ????????? ??????????/p>

CopyCode imageCopy Code
DEFINE CLASS customer AS CUSTOM
   LastName = ""
   FirstName = ""
   Birthday = { - - }
   PROCEDURE Age
      IF !EMPTY(THIS.Birthday)
         RETURN YEAR(DATE()) - YEAR(THIS.Birthday)
      ELSE
         RETURN 0
      ENDIF
   ENDPROC
ENDDEFINE

?????, ????? ??? ???? ?????????????? ???^??. u?????? ???, ?????????? u? ?? ????????????? ?????? ???????? ????????? ???? ???? Visual FoxPro. ?? ???? ????????????????? ????? ?????????? ? ? ?????? ???????? ???, ????

??? ???? ??? ???? ???? ?, ?Visua FoxPro ?? ???. ????? ??? ?? ?????????? ???? ?? ?????? ????? ??????? ? ?????????? ??????????? ???/p>

???, ????? ????? ??? ?????? ??? ?? ??? ???????????? ????? ?????????? ???? ??, ???????. ??????? ??????, ???????? ???? ????. ? ?? ???? - ??????????? ??? ???????????????? ???. ??????? ??? ??????????? ???, ???????, ????????/p>

CopyCode imageCopy Code
DEFINE CLASS NewUser AS CUSTOM
   PROTECTED LogonTime, AccessLevel
   UserId = ""
   PassWord = ""
   LogonTime = { - - : : }
   AccessLevel = 0
   PROCEDURE Init
      DO FORM LOGON WITH ; && assuming you have created this form
         This.UserId, ;
         This.PassWord, ;
         This.AccessLevel
      This.LogonTime = DATETIME( )
   ENDPROC
* Create methods to return protected property values.
   PROCEDURE GetLogonTime
      RETURN This.LogonTime
   ENDPROC
   PROCEDURE GetAccessLevel
      RETURN This.AccessLevel
   ENDPROC
 
ENDDEFINE

 ?????? ?? ???? ????? ??, ????????code> NewUser:

CopyCode imageCopy Code
oUser = CREATEOBJECT('NewUser')
oUser.Logon

????????? ???? ???????????? ?? ??? ?????code>oUser. ???:

CopyCode imageCopy Code
IF oUser.GetAccessLevel( ) >= 4
   DO ADMIN.MPR
ENDIF

?????span>