uses
  Math;procedure StrToBytes(mStr: string; var nBytes: array of Byte);
var
  I: Integer;
begin
  FillChar(nBytes, SizeOf(nBytes), 0);
  for I := Max(0, Low(nBytes)) to Min(Length(mStr) - 1, High(nBytes)) do
    nBytes[I] := Ord(mStr[I]);
end; { StrToBytes }procedure TForm1.Button1Click(Sender: TObject);
var
  sEnroll1: array[0..239] of Byte;
  S: string;
begin
  S := '111';
  StrToBytes(S, sEnroll1);
end;