Procedural-type constants

Language:
Русский
English

  Procedural-type constants


A procedural constant must specify the identifier of a procedure or function that is assignment compatible with the type of the constant.

Example

 type
   ErrorProc = procedure(ErrorCode: Integer);

 procedure DefaultError(ErrorCode: Integer); far;
 begin
   WriteLn('Error ', ErrorCode, '.');
 end;

 const
   ErrorHandler: ErrorProc = DefaultError;

See Also

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