Error [dcc32 Fatal Error] F2084 Internal Error: AV06028036(05FB0000)-R2CD489B0-0

  

I know that probably if i recreate my project this error will get away, but i wish to know why this happens. Could someone explain me?
I am using Delphi 10.4. I was testing this project without saving it, but i saved and it keeps happening. I just want to understand why this happens.
My code:
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.Memo.Types, FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo,
FMX.StdCtrls;//, Winapi.Windows;

type
TForm1 = class(TForm)
memSource: TMemo;
memDest: TMemo;
btnInfo: TSpeedButton;
btnMai: TSpeedButton;
btnCript: TSpeedButton;
btnMin: TSpeedButton;
procedure trataTexto(Sender: TObject);
procedure FormCreate(Sender: TObject);
end;

var
Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.trataTexto(Sender: TObject);
var
S: AnsiString;
i,cont: Integer;
palavra, agora: boolean;
begin
S := memSource.Text;
if btnInfo.isPressed then
begin
palavra := False;
cont := 0;
for i := 1 to Length(S) do
begin
agora := upcase(BestFit(S[i])[1]) in [‘A’..’Z’, ‘-‘];
if palavra <> agora then
begin
if agora then
inc(cont);
palavra := agora;
end;
end;
memDest.Text := format(‘%d caracteres’#10’%d palavras’, [
Length(S),cont
]);
end else
if btnMai.isPressed then
begin
memDest.Text := Uppercase(S);
end else
if btnMin.isPressed then
begin
memDest.Text := Lowercase(S);
end else
if btnCript.isPressed then
begin
S := uppercase(S);
for i := 1 to Length(S) do
if S[i] in [‘A’..’Z’] then
S[i] := S[i];
end;
end;

end.

Comments are closed.