This is the code:
procedure TForm1.ButtonDotClick(Sender: TObject);
begin
if (POS('.', txtResult.Text))<>0 then
exit
else
txtResult.Text := txtResult.Text + ButtonDot.Caption;
end;
The error that appears is the following: E2003 Undeclared identifier: 'Caption'
I finally found the error.
In Delphi we have the option of creating a file that is either a Windows VCL or a Multi-Device, the latter being for all platforms.
In the case of creating a VCL file, the program does know the .Caption extension, but in the case of using a Multi-Device the .Caption extension has to be replaced by .Text.
In this case the error disappears.