10.8.1 alias

The alias modier allows the programmer to specify a dierent name for a procedure or function. This is mostly useful for referring to this procedure from assembly language constructs or from another object le. As an example, consider the following program:

Program Aliases;  
 
Procedure Printit;alias : 'DOIT';  
begin  
  WriteLn ('In Printit (alias : "DOIT")');  
end;  
begin  
  asm  
  call DOIT  
  end;  
end.

Remark: the specied alias is inserted straight into the assembly code, thus it is case sensitive.

The alias modier does not make the symbol public to other modules, unless the routine is also declared in the interface part of a unit, or the public modier is used to force it as public. Consider the following:

 
unit testalias;  
 
interface  
 
procedure testroutine;  
 
implementation  
 
procedure testroutine;alias:'ARoutine';  
begin  
  WriteLn('Hello world');  
end;  
 
end.

This will make the routine testroutine available publicly to external object les uunder the label name ARoutine.