unit frmDisplaySentence_u;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TfrmDispO
Delphi is not like ie Python where whitespace is significant and defines block. In Delphi you have to use begin
and end
to mark the block, in this case your for loop:
procedure TfrmDispOneChar.btnDisplayClick(Sender: TObject);
var
K, iLength : integer;
cOne : char;
sCode : string;
begin
sCode := edtCode.Text;
iLength := Length(sCode);
for K := 1 to iLength do begin
cOne := sCode[K];
memOutput.Lines.Add(cOne);
end;
end;