IPB

> Object types (object: reserved word)
Чат
Форум
Загрузка...
 

Language:
Русский
English

  Object types     (object: reserved word)


An object type is a data structure that contains a fixed number of components.

Syntax

 object
   Field;
   Field;
   ...
   Method;
   Method;
 end;

Remarks

Objects consist of an identifier, a colon and a data type. In addition, object contain method headers.

Each component is either a field (which contains data of a particular type) or a method, which performs an operation on the object.

The declaration of a field specifies an identifier that names the field, and its data type. The declaration of a method specifies a procedure, function, constructor, or destructor heading.

   Field  = FieldName(s): type;
   Method = procedure MethodName(<parameter(s)>:type);
       or = function MethodName(<parameter(s)>:type):type;
       or = constructor MethodName(<parameter(s)>: type [;<parameter(s)>:
            type]); [virtual];
       or = destructor MethodName[(<parameters>: type)];[virtual];

An object type can inherit components from another object type. The inheriting object is a descendant and the object inherited from is an ancestor.

The domain of an object type consists of itself and all its descendants.

See Also

 
 К началу страницы 
Тэги: object Types
 

Код для вставки: :: :: :: ГОСТ ::
Поделиться: //
 



-
Хостинг предоставлен компанией "Веб Сервис Центр" при поддержке компании "ДокЛаб"