title: How to correctly define function on Delphi?
body: <p>I have this function declaration and implementation</p>
  
  <pre><code>public
  function AddWordReference(wordId,translateId:Longint):Longint;
  {***}
  function AddWordReference(wordId,translateId:Longint):Longint;
  begin
  try
   if((wordId &lt;&gt; -1) OR (translateId &lt;&gt; -1))  Then
   begin
   DataModule1.TranslateDictionary.AppendRecord([nil,wordId,translateId]);
   DataModule1.TranslateDictionary.Last;
   AddWordReference := DataModule1.TranslateDictionary.FieldByName('Id').AsInteger;
   end;
  Except
  ShowMessage('Error wirh adding reference');
  AddWordReference := -1;
  end;
  AddWordReference := -1;
  end;
  </code></pre>
  
  <p>I have this error:</p>
  
  <pre><code>[Error] AddFormUnit.pas(34): Unsatisfied forward or external declaration: 'TForm2.AddWordReference'
  </code></pre>
  
  <p>How to fix this error ?</p>