title: Generate three random characters in Delphi
body: <p>Hi I am trying to generate three random characters using a function in Delphi, the code is this:</p>
  
  <pre><code>function generate(cantidad: integer): string;
  const
    letras_mi = 'abcdefghijklmnopqrstuvwxyz';
  const
    letras_ma = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  const
    numeros = '0123456789';
  var
    finalr: string;
  begin
  
    finalr := '';
  
    finalr := finalr + IntToStr(Random(Length(letras_mi)) + 1);
    finalr := finalr + IntToStr(Random(Length(letras_ma)) + 1);
    finalr := finalr + IntToStr(Random(Length(numeros)) + 1);
  
    Result := finalr;
  
  end;
  </code></pre>
  
  <p>the problem is that things like 20142 me back when I'm actually waiting 3 characters constant random variables.</p>