title: How to use Unit files in Delphi
body: <p>I'm just trying to get the hang of separate units to make my code more encapsulated.
  I'm trying to get the public/private declarations of my methods sorted out, so I can call them from other units that use <code>testunit</code>. In this example I want to make <code>hellofromotherunit</code> public, but <code>stickletters</code> private.</p>
  
  <pre><code>unit testunit;    
  
  interface
  
  uses
    Windows, Messages, Dialogs;    
  
  implementation
  
  function stickletters(a,b:string):string;
  begin
    result:=a+b;
  end;
  
  procedure hellofromotherunit();
  begin
   showmessage(stickletters('h','i'));
  end;
  
  end.
  </code></pre>
  
  <p>I could not seem to copy the private/public structure from other units as in:</p>
  
  <pre><code>Type
  private
  function stickletters(a,b:inter):integer;
  public
  procedure hellofromotherunit();
  end
  </code></pre>