Program testforward; Procedure First (n : longint); forward; Procedure Second; begin WriteLn ('In second. Calling first...'); First (1); end; Procedure First (n : longint); begin WriteLn ('First received : ',n); end; begin Second; end.You cannot define a function twice as forward (nor is there any reason why you would want to do that). Likewise, in units, you cannot have a forward declared function of a function that has been declared in the interface part. The interface declaration counts as a forward declaration. The following unit will give an error when compiled:
Unit testforward; interface Procedure First (n : longint); Procedure Second; implementation Procedure First (n : longint); forward; Procedure Second; begin WriteLn ('In second. Calling first...'); First (1); end; Procedure First (n : longint); begin WriteLn ('First received : ',n); end; end.