T5 - OOP in Pascal (Class and Object)
CLASSES and OBJECTS in Pascal
Structure of Class in Pascal
Class Structure DATA fields (instance variables). METHODS (invoked by messages sent by clients or sent by object itself).
Class in Pascal corresponds to the TYPE of Object
{—————————-interface part—————}
Type PersonPtr = ^Person; Person = OBJECT
Name : string[30];
Tel : integer;
Constructor Init(IName : str20, ITel : integer);
Procedure Display;
Function Edit : char;
end;
{———————–implementation part————-} Constructor Person.Init(IName : str20, ITel : integer); Begin
Welcome to Kaizenlog.com If you're new here, you may want to subscribe to my RSS feed , Twitter You can contact us by using the contact form or submitting a comment. You can also share this post with your friends by clicking on the 'ShareThis' button above. Thanks for visiting!









Entries (RSS)