title: How to limit for loop to print only first few records in list?
body: <p>How should I print the first 5 element from list using for loop in Delphi. Below are the sample I created:</p>
  <pre><code>p := ['a','b','c','d','e','f','g','h','i'];
  for P in p do begin
     showMessage(P);
  end
  </code></pre>
  <p>By using this I was able to print all element in the list, but I wanted to print only the first 5. Please help if you know the answer. Thanks.</p>