title: Its safe clearing component?
body: <p>I use this code for emptying fill in the form :</p>
  
  <pre><code>var
  i: integer;
  
  for i:=0 to componentcounts-1 do
      begin
      if component[i] is TEdit then
         (component[i] as Tedit).text:='';
     .....another component also include
      end;
  </code></pre>
  
  <p>but i prefer use this code outside the form, so that can be use by another form</p>
  
  <p>then i create a procedure </p>
  
  <pre><code>procedure emptyForm(f:Tform)
  var
     i:integer;
  begin
  with f do
       begin
       for i:=0 to componentcounts-1 do
           begin
           if component[i] is TEdit then
             (component[i] as Tedit).text:='';
             //.....another component also include
          end;
       end;
  end;
  </code></pre>
  
  <p>its save do this way ?</p>